MatrixCamera Class
Camera which specifies the view and projection transforms as Matrix3D objects
Assembly: PresentationCore (in PresentationCore.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation
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.
private 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; }
System.Windows.Threading.DispatcherObject
System.Windows.DependencyObject
System.Windows.Freezable
System.Windows.Media.Animation.Animatable
System.Windows.Media.Media3D.Camera
System.Windows.Media.Media3D.MatrixCamera
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.