ID3DXMATRIXStack::RotateYawPitchRoll method (D3dx9math.h)

Note

The D3DX 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 RotateYawPitchRoll(
  [in] FLOAT Yaw,
  [in] FLOAT Pitch,
  [in] FLOAT Roll
);

Parameters

Yaw [in]

Type: FLOAT

The yaw around the y-axis in radians.

Pitch [in]

Type: FLOAT

The pitch around the x-axis in radians.

Roll [in]

Type: FLOAT

The roll around the z-axis in radians.

Return value

Type: HRESULT

If the method succeeds, the return value is D3D_OK.

Remarks

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

D3DXMATRIX tmp;
D3DXMatrixRotationYawPitchRoll( &tmp, yaw, pitch, roll );
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
D3dx9math.h
Library
D3dx9.lib

See also

ID3DXMATRIXStack

D3DXMatrixRotationAxis

ID3DXMATRIXStack::RotateAxis

ID3DXMATRIXStack::RotateAxisLocal

ID3DXMATRIXStack::RotateYawPitchRollLocal