Compartilhar via


Matrix.Transformation2D Method

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

Builds a 2-D transformation matrix in the xy plane.

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

Syntax

'Declaration
Public Shared Function Transformation2D ( _
    scalingCenter As Vector2, _
    scalingRotation As Single, _
    scaling As Vector2, _
    rotationCenter As Vector2, _
    rotation As Single, _
    translation As Vector2 _
) As Matrix
'Usage
Dim scalingCenter As Vector2
Dim scalingRotation As Single
Dim scaling As Vector2
Dim rotationCenter As Vector2
Dim rotation As Single
Dim translation As Vector2
Dim returnValue As Matrix

returnValue = Matrix.Transformation2D(scalingCenter, _
    scalingRotation, scaling, rotationCenter, _
    rotation, translation)
public static Matrix Transformation2D(
    Vector2 scalingCenter,
    float scalingRotation,
    Vector2 scaling,
    Vector2 rotationCenter,
    float rotation,
    Vector2 translation
)
public:
static Matrix Transformation2D(
    Vector2 scalingCenter, 
    float scalingRotation, 
    Vector2 scaling, 
    Vector2 rotationCenter, 
    float rotation, 
    Vector2 translation
)
static member Transformation2D : 
        scalingCenter:Vector2 * 
        scalingRotation:float32 * 
        scaling:Vector2 * 
        rotationCenter:Vector2 * 
        rotation:float32 * 
        translation:Vector2 -> Matrix 

Parameters

  • scalingRotation
    Type: System.Single
    Scaling rotation factor. Use a zero value to specify no rotation.

Return Value

Type: Microsoft.WindowsMobile.DirectX.Matrix
A Matrix structure that contains the transformation matrix.

Remarks

The Transformation2D method calculates the affine transformation matrix using the following formula, with matrix concatenation evaluated in left-to-right order.

M out = (M sc )-1 * (M sr )-1 * M s * M sr * M sc * (M rc )-1 * M r * M rc * M t

where:

  • M out = output transformation matrix (the return value)

  • M sc = scaling center matrix (scalingCenter)

  • M sr = scaling rotation matrix (scalingRotation)

  • M s = scaling matrix (scaling)

  • M rc = center of rotation matrix (rotationCenter)

  • M r = rotation matrix (rotation)

  • M t = translation matrix (translation)

For 3-D transformations, use Transformation.

.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