Microsoft DirectX 8.1 (Visual Basic)

D3DXMatrixAffineTransformation

Builds an affine transformation matrix.

D3DXMatrixAffineTransformation( _ 
    MOut As D3DMATRIX, _ 
    Scaling As Single, _ 
    VRotationCenter As D3DVECTOR, _ 
    QRotation As D3DQUATERNION, _ 
    VTranslation As D3DVECTOR)

Parameters

MOut
D3DMATRIX type that is the result of the operation, an affine transformation matrix.
Scaling
Scaling factor.
VRotationCenter
D3DVECTOR type, a point identifying 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.

D3DERR_INVALIDCALL
D3DERR_OUTOFVIDEOMEMORY

For information on trapping errors, see the Microsoft® Visual Basic® Error Handling topic.

Remarks

The D3DXMatrixAffineTransformation function calculates the affine transformation matrix with the following formula: Ms * Mrc-1 * Mr * Mrc * Mt, where Ms is the scaling matrix, Mrc is the center of rotation matrix, Mr is the rotation matrix, and Mt is the translation matrix.