Export (0) Print
Expand All

ID3DXMATRIXStack::RotateAxisLocal method

Rotates (relative to the object's local coordinate space) around an arbitrary axis.

Syntax


HRESULT RotateAxisLocal(
  [in]  const D3DXVECTOR3 *pV,
  [in]  FLOAT Angle
);

Parameters

pV [in]

Type: const D3DXVECTOR3*

Pointer to the arbitrary axis of rotation. See D3DXVECTOR3.

Angle [in]

Type: FLOAT

Rotation angle about the arbitrary axis, in radians. Angles are measured counterclockwise when looking along the arbitrary axis toward the origin.

Return value

Type: HRESULT

If the method succeeds, the return value is D3D_OK. If the method fails, the return value can be D3DERR_INVALIDCALL.

Remarks

This method adds the rotation to the matrix stack with the computed rotation matrix similar to the following:



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


Because the rotation is left-multiplied to the matrix stack, the rotation is relative to the object's local coordinate space.

Requirements

Header

D3dx9math.h

Library

D3dx9.lib

See also

ID3DXMATRIXStack
D3DXMatrixRotationAxis
ID3DXMATRIXStack::RotateAxis
ID3DXMATRIXStack::RotateYawPitchRoll
ID3DXMATRIXStack::RotateYawPitchRollLocal

 

 

Community Additions

ADD
Show:
© 2014 Microsoft