Поделиться через


Transforms.Projection Property

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

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
    Get
    Set
'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);
}
member Projection : Matrix with get, set

Property Value

Type: Microsoft.WindowsMobile.DirectX.Matrix
A Matrix that represents the projection transformation.

Remarks

The default projection transformation Matrix is the identity Matrix.

Examples

The following example shows how to use the Projection property. This example is taken from the Mobile Matrices Sample in the Managed Direct3D Mobile 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);

.NET Framework Security

Platforms

Windows CE, Windows Mobile for Smartphone, Windows Mobile for Pocket PC

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 Compact Framework

Supported in: 3.5, 2.0

See Also

Reference

Transforms Class

Transforms Members

Microsoft.WindowsMobile.DirectX.Direct3D Namespace