Represents a 4 x 4 matrix used for transformations in 3-D space.
Assembly: PresentationCore (in PresentationCore.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation
[SerializableAttribute] [TypeConverterAttribute(typeof(Matrix3DConverter))] public struct Matrix3D : IFormattable
<object property="m11, m12, m13, m21, m22, m23, m31, m32, m33, offsetX, offsetY, offsetZ"/> - or - <object property="Identity"/>
has the following row-vector syntax:
Note that because the fourth column is also accessible, the matrix allows developers to represent affine as well as non-affine transforms.
Matrices can be appended or prepended to other matrices. Appending matrix A to matrix B denotes a transformation by B and then by A:
// Multiplies a Vector3D by a Matrix3D using the static Multiply method. // Returns a Vector3D. Vector3D vector1 = new Vector3D(20, 30, 40); Matrix3D matrix1 = new Matrix3D(10, 10, 10, 0, 20, 20, 20, 0, 30, 30, 30, 0, 5, 10, 15, 1); Vector3D vectorResult = new Vector3D(); vectorResult = Vector3D.Multiply(vector1,matrix1); // vector Result is equal to (2000, 2000, 2000)
Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.