Export (0) Print
Expand All

Matrix.Identity Property

Returns an instance of the identity matrix.

Namespace: Microsoft.Xna.Framework
Assembly: Microsoft.Xna.Framework (in microsoft.xna.framework.dll)

public static Matrix Identity { get; }

Property Value

The identity matrix.

Except for the main diagonal, whose elements are all ones, the identity matrix is a square matrix composed of zeros. Unlike all other matrix multiplications, the multiplication between an identity matrix and another matrix is commutative.

This is useful for initializing a matrix to a known value before you perform additional operations, such as a transformation.

Bb197414.note(en-us,XNAGameStudio.41).gifNote
Multiplying a matrix with its inverse results in an identity matrix.

Xbox 360, Windows 7, Windows Vista, Windows XP, Windows Phone

Community Additions

ADD
Show:
© 2014 Microsoft