MatrixCamera Class
.NET Framework 3.0
Camera which specifies the view and projection transforms as Matrix3D objects
Namespace: System.Windows.Media.Media3D
Assembly: PresentationCore (in presentationcore.dll)
XML Namespace: http://schemas.microsoft.com/winfx/2006/xaml/presentation
Assembly: PresentationCore (in presentationcore.dll)
XML Namespace: http://schemas.microsoft.com/winfx/2006/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.
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; }
System.Object
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
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 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.Community Additions
ADD
Show: