DirectX SDK

ID3DXMatrixStack::RotateAxisLocal

The ID3DXMatrixStack::RotateAxisLocal method determines the product of the computed rotation matrix and the current matrix.

HRESULT RotateAxisLocal(
  const D3DXVECTOR3* pV,
  float angle
); 

Parameters

pV
A pointer to a D3DXVECTOR3 structure that identifies the axis angle.
angle
The angle of rotation in radians. Angles are measured clockwise when looking along the rotation axis toward the origin.

Return Values

If this method is successful, it returns S_OK; otherwise, it returns D3DXERR_NULLPOINTER.

Remarks

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];

Requirements

  Windows NT/2000: Requires Windows 2000.
  Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
  Windows CE: Unsupported.
  Version: Requires DirectX 7.0.
  Header: Declared in d3dxmath.h.
  Library: Use d3dx.lib.

See Also

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