Matrix3D Structure

 

Represents a 4 x 4 matrix used for transformations in 3-D space.

Namespace:   System.Windows.Media.Media3D
Assembly:  PresentationCore (in PresentationCore.dll)

[SerializableAttribute]
[TypeConverterAttribute(typeof(Matrix3DConverter))]
public struct Matrix3D : IFormattable

NameDescription
System_CAPS_pubpropertyDeterminant

Retrieves the determinant of this Matrix3D structure.

System_CAPS_pubpropertyHasInverse

Gets a value that indicates whether this Matrix3D is invertible.

System_CAPS_pubpropertySystem_CAPS_staticIdentity

Changes a Matrix3D structure into an identity Matrix3D.

System_CAPS_pubpropertyIsAffine

Gets a value that indicates whether this Matrix3D structure is affine.

System_CAPS_pubpropertyIsIdentity

Determines whether this Matrix3D structure is an identity Matrix3D.

System_CAPS_pubpropertyM11

Gets or sets the value of the first row and first column of this Matrix3D structure.

System_CAPS_pubpropertyM12

Gets or sets the value of the first row and second column of this Matrix3D structure.

System_CAPS_pubpropertyM13

Gets or sets the value of the first row and third column of this Matrix3D structure.

System_CAPS_pubpropertyM14

Gets or sets the value of the first row and fourth column of this Matrix3D structure.

System_CAPS_pubpropertyM21

Gets or sets the value of the second row and first column of this Matrix3D structure.

System_CAPS_pubpropertyM22

Gets or sets the value of the second row and second column of this Matrix3D structure.

System_CAPS_pubpropertyM23

Gets or sets the value of the second row and third column of this Matrix3D structure.

System_CAPS_pubpropertyM24

Gets or sets the value of the second row and fourth column of this Matrix3D structure.

System_CAPS_pubpropertyM31

Gets or sets the value of the third row and first column of this Matrix3D structure.

System_CAPS_pubpropertyM32

Gets or sets the value of the third row and second column of this Matrix3D structure.

System_CAPS_pubpropertyM33

Gets or sets the value of the third row and third column of this Matrix3D structure.

System_CAPS_pubpropertyM34

Gets or sets the value of the third row and fourth column of this Matrix3D structure.

System_CAPS_pubpropertyM44

Gets or sets the value of the fourth row and fourth column of this Matrix3D structure.

System_CAPS_pubpropertyOffsetX

Gets or sets the value of the fourth row and first column of this Matrix3D structure.

System_CAPS_pubpropertyOffsetY

Gets or sets the value of the fourth row and second column of this Matrix3D structure.

System_CAPS_pubpropertyOffsetZ

Gets or sets the value of the fourth row and third column of this Matrix3D structure.

NameDescription
System_CAPS_pubmethodAppend(Matrix3D)

Appends a specified matrix to the current matrix.

System_CAPS_pubmethodEquals(Matrix3D)

Tests equality between two matrices.

System_CAPS_pubmethodSystem_CAPS_staticEquals(Matrix3D, Matrix3D)

Tests equality between two matrices.

System_CAPS_pubmethodEquals(Object)

Tests equality between two matrices. (Overrides ValueType.Equals(Object).)

System_CAPS_pubmethodGetHashCode()

Returns the hash code for this matrix (Overrides ValueType.GetHashCode().)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodInvert()

Inverts this Matrix3D structure.

System_CAPS_pubmethodSystem_CAPS_staticMultiply(Matrix3D, Matrix3D)

Multiplies the specified matrices.

System_CAPS_pubmethodSystem_CAPS_staticParse(String)

Converts a string representation of a Matrix3D structure into the equivalent Matrix3D structure.

System_CAPS_pubmethodPrepend(Matrix3D)

Prepends a specified matrix to the current matrix.

System_CAPS_pubmethodRotate(Quaternion)

Appends a rotation transform to the current Matrix3D.

System_CAPS_pubmethodRotateAt(Quaternion, Point3D)

Rotates this Matrix3D about the specified Point3D.

System_CAPS_pubmethodRotateAtPrepend(Quaternion, Point3D)

Prepends a rotation about a specified center Point3D to this Matrix3D structure.

System_CAPS_pubmethodRotatePrepend(Quaternion)

Prepends a rotation specified by a Quaternion to this Matrix3D structure.

System_CAPS_pubmethodScale(Vector3D)

Appends the specified scale Vector3D to this Matrix3D structure.

System_CAPS_pubmethodScaleAt(Vector3D, Point3D)

Scales this Matrix3D structure by the specified Vector3D about the specified Point3D.

System_CAPS_pubmethodScaleAtPrepend(Vector3D, Point3D)

Prepends the specified scale transformation about the specified Point3D to this Matrix3D structure.

System_CAPS_pubmethodScalePrepend(Vector3D)

Prepends the specifed scale Vector3D to the current Matrix3D structure.

System_CAPS_pubmethodSetIdentity()

Changes this Matrix3D structure into an identity matrix.

System_CAPS_pubmethodToString()

Creates a string representation of this Matrix3D structure. (Overrides ValueType.ToString().)

System_CAPS_pubmethodToString(IFormatProvider)

Creates a string representation of this Matrix3D structure.

System_CAPS_pubmethodTransform(Point3D)

Transforms the specified Point3D by the Matrix3D and returns the result.

System_CAPS_pubmethodTransform(Point3D[])

Transforms the specified Point3D objects in the array by the Matrix3D.

System_CAPS_pubmethodTransform(Point4D)

Transforms the specified Point4D by the Matrix3D and returns the result..

System_CAPS_pubmethodTransform(Point4D[])

Transforms the specified Point4D objects in the array by the Matrix3D and returns the result.

System_CAPS_pubmethodTransform(Vector3D)

Transforms the specified Vector3D by this Matrix3D.

System_CAPS_pubmethodTransform(Vector3D[])

Transforms the specified Vector3D objects in the array by this Matrix3D.

System_CAPS_pubmethodTranslate(Vector3D)

Appends a translation of the specified offset to the current Matrix3D structure.

System_CAPS_pubmethodTranslatePrepend(Vector3D)

Prepends a translation of the specified offset to this Matrix3D structure.

NameDescription
System_CAPS_puboperatorSystem_CAPS_staticEquality(Matrix3D, Matrix3D)

Compares two Matrix3D instances for exact equality.

System_CAPS_puboperatorSystem_CAPS_staticInequality(Matrix3D, Matrix3D)

Compares two Matrix3D instances for exact inequality.

System_CAPS_puboperatorSystem_CAPS_staticMultiply(Matrix3D, Matrix3D)

Multiplies the specified matrices.

NameDescription
System_CAPS_pubinterfaceSystem_CAPS_privmethodIFormattable.ToString(String, IFormatProvider)

Formats the value of the current instance using the specified format.

Matrix3D has the following row-vector syntax:

M11

M12

M13

M14

M21

M22

M23

M24

M31

M32

M33

M34

OffsetX

OffsetY

OffsetZ

M44

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:

<object property="m11, m12, m13, m21, m22, m23, m31, m32, m33, offsetX, offsetY, offsetZ"/>
- or -
<object property="Identity"/>

M11

System.Double

The value in the first row and first column of this Matrix3D. For more information, see the M11 property.

M12

System.Double

The value in the first row and second column of this Matrix3D. For more information, see the M12 property.

M13

System.Double

The value in the first row and third column of this Matrix3D. For more information, see the M13 property.

M14

System.Double

The value in the first row and fourth column of this Matrix3D. For more information, see the M14 property.

M21

System.Double

The value in the second row and first column of this Matrix3D. For more information, see the M21 property.

M22

System.Double

The value in the second row and second column of this Matrix3D. For more information, see the M22 property.

M23

System.Double

The value in the second row and third column of this Matrix3D. For more information, see the M23 property.

M24

System.Double

The value in the second row and fourth column of this Matrix3D. For more information, see the M24 property.

M31

System.Double

The value in the third row and first column of this Matrix3D. For more information, see the M31 property.

M32

System.Double

The value in the third row and second column of this Matrix3D. For more information, see the M32 property.

M33

System.Double

The value in the third row and third column of this Matrix3D. For more information, see the M34 property.

M34

System.Double

The value in the third row and fourth column of this Matrix3D. For more information, see the M33 property.

M44

System.Double

The value in the fourth row and fourth column of this Matrix3D. For more information, see the M44 property.

offsetX

System.Double

The value in the fourth row and first column of this Matrix3D. For more information, see the OffsetX property.

offsetY

System.Double

The value in the fourth row and second column of this Matrix3D. For more information, see the OffsetY property.

offsetZ

System.Double

The value in the fourth row and third column of this Matrix3D. For more information, see the OffsetZ property.

// 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)

.NET Framework
Available since 3.0
Silverlight
Available since 3.0
Windows Phone Silverlight
Available since 7.0

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: