Share via


Matrix.Transform(Vector3,Quaternion,Vector3,Vector3,Quaternion,Vector3) Method (Microsoft.DirectX)

Transforms the matrix.

Definition

Visual Basic Public Sub Transform( _
    ByVal scalingCenter As Vector3, _
    ByVal scalingRotation As Quaternion, _
    ByVal scalingFactor As Vector3, _
    ByVal rotationCenter As Vector3, _
    ByVal rotation As Quaternion, _
    ByVal translation As Vector3 _
)
C# public void Transform(
    Vector3 scalingCenter,
    Quaternion scalingRotation,
    Vector3 scalingFactor,
    Vector3 rotationCenter,
    Quaternion rotation,
    Vector3 translation
);
C++ public:
void Transform(
    Vector3 scalingCenter,
    Quaternion scalingRotation,
    Vector3 scalingFactor,
    Vector3 rotationCenter,
    Quaternion rotation,
    Vector3 translation
);
JScript public function Transform(
    scalingCenter : Vector3,
    scalingRotation : Quaternion,
    scalingFactor : Vector3,
    rotationCenter : Vector3,
    rotation : Quaternion,
    translation : Vector3
);

Parameters

scalingCenter Microsoft.DirectX.Vector3
A Vector3 structure that identifies the scaling center point.
scalingRotation Microsoft.DirectX.Quaternion
A Quaternion structure that specifies the scaling rotation. Use Quaternion.Identity to specify no scaling.
scalingFactor Microsoft.DirectX.Vector3
A Vector3 structure that is the scaling vector.
rotationCenter Microsoft.DirectX.Vector3
A Vector3 structure that is a point that identifies 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 Vector3.Empty to specify no translation.

Remarks

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

M out = (Msc)-1 * (Msr)-1 * Ms * Msr * Msc * (Mrc)-1 * Mr * Mrc * Mt

where:

  • M out = transformation matrix
  • M sc = scaling center matrix (scalingCenter)
  • M sr = scaling rotation matrix (scalingRotation)
  • M s = scaling matrix (scalingFactor)
  • M rc = center of rotation matrix (rotationCenter)
  • M r = rotation matrix (rotation)
  • M t = translation matrix (translation)

For 3-D affine transformations, use AffineTransformation.

See Also