Partager via


Matrix.Transformation2D, méthode

Mise à jour : novembre 2007

Construit une matrice de transformation 2D dans le plan xy.

Espace de noms :  Microsoft.WindowsMobile.DirectX
Assembly :  Microsoft.WindowsMobile.DirectX (dans Microsoft.WindowsMobile.DirectX.dll)

Syntaxe

'Déclaration
Public Shared Function Transformation2D ( _
    scalingCenter As Vector2, _
    scalingRotation As Single, _
    scaling As Vector2, _
    rotationCenter As Vector2, _
    rotation As Single, _
    translation As Vector2 _
) As Matrix
'Utilisation
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
)
public static function Transformation2D(
    scalingCenter : Vector2, 
    scalingRotation : float, 
    scaling : Vector2, 
    rotationCenter : Vector2, 
    rotation : float, 
    translation : Vector2
) : Matrix

Paramètres

  • scalingRotation
    Type : System.Single

    Facteur de rotation de mise à l'échelle. Utilisez la valeur zéro pour ne spécifier aucune rotation.

Valeur de retour

Type : Microsoft.WindowsMobile.DirectX.Matrix

Structure Matrix qui contient la matrice de transformation.

Notes

La méthode Transformation2D calcule la matrice de transformation affine à l'aide de la formule suivante, avec la concaténation de matrice évaluée dans l'ordre de gauche à droite.

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

où :

  • M out = matrice de transformation en sortie (valeur de retour)

  • M sc = matrice du centre de mise à l'échelle (scalingCenter)

  • M sr = matrice de rotation de mise à l'échelle (scalingRotation)

  • M s = matrice de mise à l'échelle (scaling)

  • M rc = centre de la matrice de rotation (rotationCenter)

  • M r = matrice de rotation (rotation)

  • M t = matrice de traduction (translation)

Pour les transformations 3D, utilisez Transformation.

Autorisations

Plateformes

Windows CE, Windows Mobile pour Smartphone, Windows Mobile pour Pocket PC

Le .NET Framework et le .NET Compact Framework ne prennent pas en charge toutes les versions de chaque plateforme. Pour obtenir la liste des versions prises en charge, consultez Configuration requise du .NET Framework.

Informations de version

.NET Compact Framework

Pris en charge dans : 3.5, 2.0

Voir aussi

Référence

Matrix, structure

Membres Matrix

Microsoft.WindowsMobile.DirectX, espace de noms