Microsoft DirectX 9.0

ID3DXMatrixStack::RotateAxisLocal Method

Determines the product of the computed rotation matrix and the current matrix.


HRESULT RotateAxisLocal(      

    CONST D3DXVECTOR3 *pV,     FLOAT Angle );


[in] Pointer to a D3DXVECTOR3 structure that identifies the axis angle.
[in] Angle of rotation in radians. Angles are measured clockwise when looking along the rotation axis toward the origin.

Return Value

If the method succeeds, the return value is D3D_OK.

If the method fails, the return value can be D3DERR_INVALIDCALL.


This method left-multiplies the current matrix with the computed rotation matrix, counterclockwise about the given axis with the given angle (rotation is about the local origin of the object).

    D3DXMATRIX tmp;
    D3DXMatrixRotationAxis( &tmp, pV, angle );
    m_stack[m_currentPos] = tmp * m_stack[m_currentPos];

See Also

ID3DXMatrixStack::RotateAxis, ID3DXMatrixStack::RotateYawPitchRoll, ID3DXMatrixStack::RotateYawPitchRollLocal

© 2002 Microsoft Corporation. All rights reserved.