Matrix.RotationY Method

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

Builds a matrix that rotates around the y-axis.

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

Syntax

'Declaration
Public Shared Function RotationY ( _
    angle As Single _
) As Matrix
'Usage
Dim angle As Single
Dim returnValue As Matrix

returnValue = Matrix.RotationY(angle)
public static Matrix RotationY(
    float angle
)
public:
static Matrix RotationY(
    float angle
)
static member RotationY : 
        angle:float32 -> Matrix 

Parameters

  • angle
    Type: System.Single
    Angle of rotation, in radians. Angles are measured clockwise when looking along the rotation axis toward the origin.

Return Value

Type: Microsoft.WindowsMobile.DirectX.Matrix
Rotated Matrix structure.

Examples

The following example shows how to use the RotationY method. This example is taken from the Direct3D Mobile Matrices Sample in the Windows Software Development Kit (SDK).

' 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

Matrix Structure

Matrix Members

Microsoft.WindowsMobile.DirectX Namespace