Transforms.World Property
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
'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);
}
/** @property */
public Matrix get_World ()
/** @property */
public void set_World (Matrix value)
public function get World () : Matrix
public function set World (value : Matrix)
Not applicable.
Property Value
A Matrix representing the transformation.
Example
The following example shows how to use the World property. This example is taken from the Direct3D Mobile Matrices Sample.
' 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);
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