Matrix StructureDelta Engine Documentation
4x4 Matrix from 16 floats, access happens via indexer, optimizations done in BuildService. View code on GitHub

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

public struct Matrix : IEquatable<Matrix>

The Matrix type exposes the following members.

Constructors

  NameDescription
Public methodMatrix( Single )
Initializes a new instance of the Matrix class
Public methodMatrix(String)
Initializes a new instance of the Matrix class
Top
Methods

  NameDescription
Public methodStatic memberCreateLookAt
Public methodStatic memberCreateOrthoProjection(Size)
Public methodStatic memberCreateOrthoProjection(Size, Single, Single)
Public methodStatic memberCreatePerspective
Public methodStatic memberCreateRotationX
Public methodStatic memberCreateRotationY
Public methodStatic memberCreateRotationZ
Public methodStatic memberCreateRotationZYX(EulerAngles)
Public methodStatic memberCreateRotationZYX(Single, Single, Single)
Public methodStatic memberCreateScale(Vector3D)
Public methodStatic memberCreateScale(Single, Single, Single)
Public methodStatic memberCreateTranslation
Public methodEquals(Object) (Overrides ValueType Equals(Object).)
Public methodEquals(Matrix)
Public methodStatic memberFromAxisAngle
Public methodStatic memberFromQuaternion
Further details on how to compute matrix from quaternion: http://renderfeather.googlecode.com/hg-history/034a1900d6e8b6c92440382658d2b01fc732c5de/Doc/optimized%2520Matrix%2520quaternion%2520conversion.pdf View code on GitHub
Public methodStatic memberFrustum
Public methodGetDeterminant
More details how to calculate Matrix Determinants: http://en.wikipedia.org/wiki/Determinant View code on GitHub
Public methodGetHashCode (Overrides ValueType GetHashCode .)
Public methodStatic memberInverseTranspose
Public methodStatic memberInvert
Public methodIsNearlyEqual
Public methodToString (Overrides ValueType ToString .)
Public methodStatic memberTransformHomogeneousCoordinate
Public methodTransformNormal
Public methodStatic memberTranspose
Top
Operators

  NameDescription
Public operatorStatic memberDivision
Public operatorStatic memberEquality
Public operatorStatic memberInequality
Public operatorStatic memberMultiply(Matrix, Matrix)
Public operatorStatic memberMultiply(Matrix, Vector3D)
Top
Fields

  NameDescription
Public fieldStatic memberIdentity
Public fieldStatic memberSizeInBytes
Top
Properties

  NameDescription
Public propertyForward
Public propertyGetValues
Public propertyItem
Public propertyRight
Public propertyTranslation
Public propertyUp
Top
Remarks

Tests: DeltaEngine.Tests.Datatypes.MatrixTests
Examples

42 unit tests call DeltaEngine.Datatypes.Matrix
[Test]
public void MatrixZero()
{
    matrix = new Matrix();
    for (int i = 0; i < 16; i++)
        Assert.AreEqual(0, matrix[i]);
}
[Test]
public void CreateWith16Floats()
{
    AssertValues0To15();
}
[Test]
public void CreateFromString()
{
    var textMatrix = new Matrix("0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15");
    for (int i = 0; i < 16; i++)
        Assert.AreEqual(textMatrix[i], matrix[i]);
}
See Also