Microsoft DirectX 8.1 (C++)

ID3DXMatrixStack::RotateAxis

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

HRESULT RotateAxis(
  CONST D3DXVECTOR3* pV,
  FLOAT Angle
); 

Parameters

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

Return Values

If the method succeeds, the return value is D3D_OK.

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

Remarks

This method right-multiplies the current matrix with the computed rotation matrix, counterclockwise about the given axis with the given angle (rotation is about the current world origin).

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

Requirements

  Header: Declared in D3dx8math.h.
  Import Library: Use D3dx8.lib.

See Also

ID3DXMatrixStack::RotateAxisLocal, ID3DXMatrixStack::RotateYawPitchRoll, ID3DXMatrixStack::RotateYawPitchRollLocal