This documentation is archived and is not being maintained.

MatrixCamera Class

Camera which specifies the view and projection transforms as Matrix3D objects

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

public sealed class MatrixCamera : Camera
public final class MatrixCamera extends Camera
public final class MatrixCamera extends Camera
<MatrixCamera .../>

This camera enables applications to calculate their own view and projection matrices. This allows applications to define cameras not directly supported by the ProjectionCamera subclasses.

Using a MatrixCamera is the only way an application can know what the View/Projection matrices are.

A MatrixCamera can be animated using the Transform property.

The following code creates a MatrixCamera and sets the ViewMatrix and ProjectionMatrix properties.

public void SetMatrixCamera(object sender, EventArgs e)
    //Define matrices for ViewMatrix and ProjectionMatrix properties.
    Matrix3D vmatrix = new Matrix3D(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
    Matrix3D pmatrix = new Matrix3D(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);

    MatrixCamera mCamera = new MatrixCamera(vmatrix, pmatrix);
    myViewport.Camera = mCamera;

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

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0