![]() |
![]() |
![]() |
UnsafeNativeMethods.Matrix.Transformation Method |
Language: |
Builds a transformation matrix.
Visual Basic .NET Public Shared Function Transformation( _
ByVal pOut As Matrix, _
ByVal scalingCenter As Vector3, _
ByVal scalingRotation As Quaternion, _
ByVal scalingFactor As Vector3, _
ByVal rotationCenter As Vector3, _
ByVal rotation As Quaternion, _
ByVal translation As Vector3 _
) As MatrixC# public static Matrix Transformation(
Matrix pOut,
Vector3 scalingCenter,
Quaternion scalingRotation,
Vector3 scalingFactor,
Vector3 rotationCenter,
Quaternion rotation,
Vector3 translation
);Managed C++ public: static Matrix Transformation(
Matrix pOut,
Vector3 scalingCenter,
Quaternion scalingRotation,
Vector3 scalingFactor,
Vector3 rotationCenter,
Quaternion rotation,
Vector3 translation
);JScript .NET public static function Transformation(
pOut : Matrix,
scalingCenter : Vector3,
scalingRotation : Quaternion,
scalingFactor : Vector3,
rotationCenter : Vector3,
rotation : Quaternion,
translation : Vector3
) : Matrix;
pOut Microsoft.DirectX.Matrix. Resulting Matrix structure. 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 identifying 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.
Microsoft.DirectX.Matrix . Resulting Matrix structure.
The Transformation 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 = output transformation matrix (the return value)
- 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)
The return value for this method is the same value returned in the pOut parameter. Resultantly, the Transformation method can be used as a parameter for another method.
Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center