This documentation is archived and is not being maintained.

MatrixTransform3D Class

Visual Studio 2008

Creates a transformation specified by a Matrix3D, used to manipulate objects or coordinate systems in 3-D world space.

Namespace:  System.Windows.Media.Media3D
Assembly:  PresentationCore (in PresentationCore.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation

Syntax

```public sealed class MatrixTransform3D : Transform3D
```
```<MatrixTransform3D .../>
```

Remarks

A 4x4 matrix is used for three-dimensional transformations. When a point is multiplied by a matrix (P1 * M1), the point is transformed from its previous coordinate system to a new coordinate system.

Examples

```    try
{
Double setM11 = System.Convert.ToDouble(M11Text.Text);
Double setM21 = System.Convert.ToDouble(M21Text.Text);
Double setM31 = System.Convert.ToDouble(M31Text.Text);
Double setOffsetX = System.Convert.ToDouble(OffsetXText.Text);

Double setM12 = System.Convert.ToDouble(M12Text.Text);
Double setM22 = System.Convert.ToDouble(M22Text.Text);
Double setM32 = System.Convert.ToDouble(M32Text.Text);
Double setOffsetY = System.Convert.ToDouble(OffsetYText.Text);

Double setM13 = System.Convert.ToDouble(M13Text.Text);
Double setM23 = System.Convert.ToDouble(M23Text.Text);
Double setM33 = System.Convert.ToDouble(M33Text.Text);
Double setOffsetZ = System.Convert.ToDouble(OffsetZText.Text);

Double setM14 = System.Convert.ToDouble(M14Text.Text);
Double setM24 = System.Convert.ToDouble(M24Text.Text);
Double setM34 = System.Convert.ToDouble(M34Text.Text);
Double setM44 = System.Convert.ToDouble(M44Text.Text);

endMatrix3D = new Matrix3D(setM11, setM12, setM13, setM14, setM21, setM22, setM23, setM24, setM31, setM32, setM33, setM34, setOffsetX, setOffsetY, setOffsetZ, setM44);

myMatrixTransform3D.Matrix = endMatrix3D;
}
catch
{
MessageBox.Show("Set Matrix3D values or rotation values before transforming");
}
```

Inheritance Hierarchy

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

Platforms

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.

Version Information

.NET Framework

Supported in: 3.5, 3.0