Share via


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

Builds a 3-D affine transformation matrix.

Definition

Visual Basic Public 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
);
C++ public:
void AffineTransformation(
    float scaling,
    Vector3 rotationCenter,
    Quaternion rotation,
    Vector3 translation
);
JScript public function AffineTransformation(
    scaling : float,
    rotationCenter : Vector3,
    rotation : Quaternion,
    translation : Vector3
);

Parameters

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.

Remarks

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

where:

  • 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.