Partager via


ID3DXMATRIXStack::RotateYawPitchRoll, méthode (D3dx9math.h)

Notes

La bibliothèque utilitaire D3DX est déconseillée. Nous vous recommandons d’utiliser DirectXMath à la place avec cet en-tête de GitHub.

Pivote (par rapport à l’espace de coordonnées du monde) autour d’un axe arbitraire.

Syntaxe

HRESULT RotateYawPitchRoll(
  [in] FLOAT Yaw,
  [in] FLOAT Pitch,
  [in] FLOAT Roll
);

Paramètres

Yaw [in]

Type : FLOAT

Le lacet autour de l’axe y en radians.

Pitch [in]

Type : FLOAT

Tangage autour de l’axe X en radians.

Roll [in]

Type : FLOAT

Roulis autour de l’axe z en radians.

Valeur retournée

Type : HRESULT

Si la méthode réussit, la valeur de retour est D3D_OK.

Notes

Cette méthode ajoute la rotation à la pile de matrices avec la matrice de rotation calculée semblable à ce qui suit :

D3DXMATRIX tmp;
D3DXMatrixRotationYawPitchRoll( &tmp, yaw, pitch, roll );
m_stack[m_currentPos] = m_stack[m_currentPos] * tmp;

Étant donné que la rotation est multipliée à droite par rapport à la pile de matrices, la rotation est relative à l’espace de coordonnées du monde.

Spécifications

Condition requise Valeur
En-tête
D3dx9math.h
Bibliothèque
D3dx9.lib

Voir aussi

ID3DXMATRIXStack

D3DXMatrixRotationAxis

ID3DXMATRIXStack::RotateAxis

ID3DXMATRIXStack::RotateAxisLocal

ID3DXMATRIXStack::RotateYawPitchRollLocal