Matrix CreateOrthoProjection Method (Size)Delta Engine Documentation

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

public static Matrix CreateOrthoProjection(
	Size viewportSize
)

Return Value

Type: Matrix
Remarks

Tests: DeltaEngine.Tests.Datatypes.MatrixTests
Examples

1 unit tests call DeltaEngine.Datatypes.Matrix.CreateOrthoProjection(DeltaEngine.Datatypes.Size)
[Test]
public void CreateOrtographicProjectionMatrix()
{
    var size = new Size(10, 5);
    matrix = Matrix.CreateOrthoProjection(size);
    var expected = new Matrix(0.2f, 0.0f, 0.0f, 0.0f, 0.0f, -0.4f, 0.0f, 0.0f, 0.0f, 0.0f, -1.0f,
        0.0f, -1.0f, 1.0f, 0.0f, 1.0f);
    Assert.AreEqual(expected, matrix);
}
See Also