Export (0) Print
Expand All

Matrix.AffineTransformation(Single,Vector3,Quaternion,Vector3) Method (Microsoft.DirectX)

Builds a 3-D affine transformation matrix.


Visual BasicPublic Sub AffineTransformation( _
    ByVal scaling As Single, _
    ByVal rotationCenter As Vector3, _
    ByVal rotation As Quaternion, _
    ByVal translation As Vector3 _
C#public void AffineTransformation(
    float scaling,
    Vector3 rotationCenter,
    Quaternion rotation,
    Vector3 translation
void AffineTransformation(
    float scaling,
    Vector3 rotationCenter,
    Quaternion rotation,
    Vector3 translation
JScriptpublic function AffineTransformation(
    scaling : float,
    rotationCenter : Vector3,
    rotation : Quaternion,
    translation : Vector3


scaling System.Single
Scaling factor. A value of zero indicates no scaling.
rotationCenter Microsoft.DirectX.Vector3
A Vector3 structure that indicates the point at the center of rotation.
rotation Microsoft.DirectX.Quaternion
A Quaternion structure that specifies the rotation. Use Quaternion.Identity to specify no rotation.
translation Microsoft.DirectX.Vector3
A Vector3 structure that represents the translation. Use Vector2.Empty to specify no translation.


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

Mout = Ms * (Mrc)-1 * Mr * Mrc * Mt


  • Mout = output matrix (this instance)
  • Ms = scaling matrix (scaling)
  • Mrc = center of rotation matrix (rotationCenter)
  • Mr = rotation matrix (rotation)
  • Mt = translation matrix (translation)

For 2-D affine transformations, use AffineTransformation2D.

© 2015 Microsoft