Matrix Translation Property Delta Engine Documentation

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

public Vector3D Translation { get; set; }

Property Value

Type: Vector3D
Remarks

Tests: DeltaEngine.Tests.Datatypes.MatrixTests
Examples

3 unit tests call DeltaEngine.Datatypes.Matrix.Translation
[Test]
public void CheckTranslationVector()
{
    Assert.AreEqual(new Vector3D(12, 13, 14), matrix.Translation);
}
[Test]
public void ChangeTranslationVector()
{
    var vector = new Vector3D(-1, -2, -3);
    matrix.Translation = vector;
    Assert.AreEqual(vector, matrix.Translation);
}
[Test]
public void TranslateMatrix()
{
    var matrix1 = Matrix.CreateTranslation(1, 2, 3);
    var matrix2 = Matrix.CreateTranslation(1, 0, 0);
    Assert.AreEqual(new Vector3D(1, 2, 3), matrix1.Translation);
    Assert.AreEqual(Vector3D.UnitX, matrix2.Translation);
}
See Also