Ray ToString Method Delta Engine Documentation

Namespace: DeltaEngine.Datatypes
Assembly: DeltaEngine (in DeltaEngine.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public override string ToString()

Return Value

Type: String
Remarks

Tests: DeltaEngine.Tests.Datatypes.RayTests
Examples

1 unit tests call DeltaEngine.Datatypes.Ray.ToString
[Test]
public void CanConvertToStringAndBack()
{
    var ray = new Ray(Vector3D.UnitX, Vector3D.UnitY);
    var stringRay = ray.ToString();
    Assert.AreEqual("Ray({1, 0, 0},{0, 1, 0})", stringRay);
    var retrievedRay = new Ray(stringRay);
    Assert.AreEqual(ray.Origin, retrievedRay.Origin);
    Assert.AreEqual(ray.Direction, retrievedRay.Direction);
}
See Also