Share via


Transforms.View Property

Gets or sets the view transformation matrix.

Namespace: Microsoft.WindowsMobile.DirectX.Direct3D
Assembly: Microsoft.WindowsMobile.DirectX (in microsoft.windowsmobile.directx.dll)

Syntax

'Declaration
Public Property View As Matrix
'Usage
Dim instance As Transforms
Dim value As Matrix

value = instance.View

instance.View = value
public Matrix View { get; set; }
public:
property Matrix View {
    Matrix get ();
    void set (Matrix value);
}
/** @property */
public Matrix get_View ()

/** @property */
public void set_View (Matrix value)
public function get View () : Matrix

public function set View (value : Matrix)
Not applicable.

Property Value

A Matrix representing the transformation.

Remarks

The default view transformation Matrix is the identity Matrix.

Example

The following example shows how to use the View property. This example is taken from the Direct3D Mobile Matrices Sample.

' Set up the view matrix. A view matrix can be defined given an eye point,
' a point to lookat, and a direction indicating which way is up. Here, you set
' the eye five units back along the z-axis and up three units, look at the
' origin, and define "up" to be in the y-direction.
device.Transform.View = Matrix.LookAtLH(New Vector3(0.0F, 3.0F, -5.0F), New Vector3(0.0F, 0.0F, 0.0F), New Vector3(0.0F, 1.0F, 0.0F))
// Set up the view matrix. A view matrix can be defined given an eye point,
// a point to look at, and a direction indicating which way is up. Here, you set
// the eye five units back along the z-axis and up three units, look at the
// origin, and define "up" to be in the y-direction.
device.Transform.View = Matrix.LookAtLH(new Vector3(0.0f, 3.0f, -5.0f), new Vector3(0.0f, 0.0f, 0.0f), new Vector3(0.0f, 1.0f, 0.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