Transforms.Projection Property
Gets or sets the projection transformation.
Namespace: Microsoft.WindowsMobile.DirectX.Direct3D
Assembly: Microsoft.WindowsMobile.DirectX (in microsoft.windowsmobile.directx.dll)
Syntax
'Declaration
Public Property Projection As Matrix
'Usage
Dim instance As Transforms
Dim value As Matrix
value = instance.Projection
instance.Projection = value
public Matrix Projection { get; set; }
public:
property Matrix Projection {
Matrix get ();
void set (Matrix value);
}
/** @property */
public Matrix get_Projection ()
/** @property */
public void set_Projection (Matrix value)
public function get Projection () : Matrix
public function set Projection (value : Matrix)
Not applicable.
Property Value
A Matrix that represents the projection transformation.
Remarks
The default projection transformation Matrix is the identity Matrix.
Example
The following example shows how to use the Projection property. This example is taken from the Direct3D Mobile Matrices Sample.
' For the projection matrix, set up a perspective transform (which
' transforms geometry from 3-D view space to 2-D viewport space, with
' a perspective divide making objects smaller in the distance). To build
' a perspective transform, you need the field of view (1/4 PI is common),
' the aspect ratio, and the near and far clipping planes (which define
' the distances at which geometry should no longer be rendered).
device.Transform.Projection = Matrix.PerspectiveFovLH(System.Convert.ToSingle(Math.PI) / 4, 1.0F, 1.0F, 100.0F)
// For the projection matrix, set up a perspective transform (which
// transforms geometry from 3-D view space to 2-D viewport space, with
// a perspective divide making objects smaller in the distance). To build
// a perspective transform, you need the field of view (1/4 PI is common),
// the aspect ratio, and the near and far clipping planes (which define
// the distances at which geometry should no longer be rendered).
device.Transform.Projection = Matrix.PerspectiveFovLH((float)Math.PI / 4, 1.0f, 1.0f, 100.0f);
Platforms
Windows CE, Windows Mobile for Pocket PC, Windows Mobile for Smartphone
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.
Version Information
.NET Compact Framework
Supported in: 2.0
See Also
Reference
Transforms Class
Transforms Members
Microsoft.WindowsMobile.DirectX.Direct3D Namespace