Compartir a través de


Transforms.World 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 first world matrix.

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

Syntax

'Declaration
Public Property World As Matrix
    Get
    Set
'Usage
Dim instance As Transforms
Dim value As Matrix

value = instance.World

instance.World = value
public Matrix World { get; set; }
public:
property Matrix World {
    Matrix get ();
    void set (Matrix value);
}
member World : Matrix with get, set

Property Value

Type: Microsoft.WindowsMobile.DirectX.Matrix
A Matrix representing the transformation.

Examples

The following example shows how to use the World property. This example is taken from the Mobile Matrices Sample in the Managed Direct3D Mobile Samples.

' For the world matrix, rotate the object about the y-axis.
' Set up the rotation matrix to generate one full rotation (2*PI radians) 
' every 1000 ms. To avoid the loss of precision inherent in very high 
' floating-point numbers, the system time is modulated by the rotation 
' period before conversion to a radian angle.
Dim iTime As Integer = Environment.TickCount Mod 1000
Dim fAngle As Single = iTime * (2.0F * System.Convert.ToSingle(Math.PI)) / 1000.0F
device.Transform.World = Matrix.RotationY(fAngle)
// For the world matrix, rotate the object about the y-axis.

// Set up the rotation matrix to generate one full rotation (2*PI radians)
// every 1000 ms. To avoid the loss of precision inherent in very high
// floating-point numbers, the system time is modulated by the rotation
// period before conversion to a radian angle.
int iTime = Environment.TickCount % 1000;
float fAngle = iTime * (2.0f * (float)Math.PI) / 1000.0f;
device.Transform.World = Matrix.RotationY(fAngle);

.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