D3DXMatrixTransformation
Builds a transformation matrix.
D3DXMatrixTransformation( _
MOut As D3DMATRIX, _
VScaleCenter As D3DVECTOR, _
QScaleRotation As D3DQUATERNION, _
VScale As D3DVECTOR, _
VRotationCenter As D3DVECTOR, _
QRotation As D3DQUATERNION, _
VTranslation As D3DVECTOR)
Parameters
- MOut
- D3DMATRIX type that is the result of the operation, the transformation matrix.
- VScaleCenter
- D3DVECTOR type, identifying the scaling center point. If this argument is an empty D3DVECTOR type, it is treated as identity.
- QScaleRotation
- D3DQUATERNION type that specifies the scaling rotation If this argument is an empty D3DQUATERNION type, it is treated as identity.
- VScale
- D3DVECTOR type, the scaling vector. If this argument is an empty D3DVECTOR type, it is treated as identity.
- VRotationCenter
- D3DVECTOR type, a point that identifies the center of rotation. If this argument is an empty D3DVECTOR type, it is treated as identity.
- QRotation
- D3DQUATERNION type that specifies the rotation. If this argument is an empty D3DQUATERNION type, it is treated as identity.
- VTranslation
- D3DVECTOR type, representing the translation. If this argument is an empty D3DVECTOR type, it is treated as identity.
Error Codes
If the function fails, an error is raised and Err.Number can be set to one of the following values.
For information on trapping errors, see the Microsoft® Visual Basic® Error Handling topic.
Remarks
The D3DXMatrixTransformation function calculates the transformation matrix with the following formula: Msc-1 * Msr-1 * Ms * Msr * Msc * Mrc-1 * Mr * Mrc * Mt, where Msc is the center scaling matrix, Msr is the scaling rotation matrix, Ms is the scaling matrix, Mrc is the center of rotation matrix, Mr is the rotation matrix, and Mt is the translation matrix.
See Also
D3DXMatrixAffineTransformation