Skip to content

Latest commit

 

History

History
104 lines (64 loc) · 2.31 KB

id3dxmatrixstack-rotateaxis.md

File metadata and controls

104 lines (64 loc) · 2.31 KB
description ms.assetid title ms.topic ms.date topic_type api_name api_type api_location
ID3DXMATRIXStack::RotateAxis method (D3DX10.h) - Rotates (relative to world coordinate space) around an arbitrary axis.
7c842bf6-2d13-422e-8136-0506a76ce9fe
ID3DXMATRIXStack::RotateAxis method (D3DX10.h)
reference
05/31/2018
APIRef
kbSyntax
ID3DXMATRIXStack.RotateAxis
COM
D3DX10.lib
D3DX10.dll

ID3DXMATRIXStack::RotateAxis method (D3DX10.h)

Note

The D3DX10 utility library is deprecated. We recommend that you use DirectXMath instead along with this header from GitHub.

Rotates (relative to world coordinate space) around an arbitrary axis.

Syntax

HRESULT RotateAxis(
  [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] = m_stack[m_currentPos] * tmp;

Because the rotation is right-multiplied to the matrix stack, the rotation is relative to world coordinate space.

Requirements

Requirement Value
Header
D3DX10.h
Library
D3DX10.lib

See also

ID3DXMatrixStack

D3DX Interfaces