Funzione D3DXMatrixLookAtRH (D3DX10Math.h)
Nota
La libreria di utilità D3DX10 è deprecata. È consigliabile usare invece DirectXMath .
Compila una matrice di controllo a destra.
Sintassi
D3DXMATRIX* D3DXMatrixLookAtRH(
_Inout_ D3DXMATRIX *pOut,
_In_ const D3DXVECTOR3 *pEye,
_In_ const D3DXVECTOR3 *pAt,
_In_ const D3DXVECTOR3 *pUp
);
Parametri
-
pOut [in, out]
-
Tipo: D3DXMATRIX*
Puntatore alla struttura D3DXMATRIX che è il risultato dell'operazione.
-
pEye [in]
-
Tipo: const D3DXVECTOR3*
Puntatore al D3DXVECTOR3 che definisce il punto visivo. Questo valore viene usato nella traduzione.
-
pAt [in]
-
Tipo: const D3DXVECTOR3*
Puntatore alla struttura D3DXVECTOR3 che definisce la destinazione di visualizzazione della fotocamera.
-
pUp [in]
-
Tipo: const D3DXVECTOR3*
Puntatore alla struttura D3DXVECTOR3 che definisce il mondo corrente, in genere [0, 1, 0].
Valore restituito
Tipo: D3DXMATRIX*
Puntatore a una struttura D3DXMATRIX che è una matrice di controllo destra.
Commenti
Il valore restituito per questa funzione è lo stesso valore restituito nel parametro pOut. In questo modo, la funzione D3DXMatrixLookAtRH può essere usata come parametro per un'altra funzione.
Questa funzione usa la formula seguente per calcolare la matrice restituita.
zaxis = normal(Eye - At)
xaxis = normal(cross(Up, zaxis))
yaxis = cross(zaxis, xaxis)
-xaxis.x yaxis.x -zaxis.x 0
-xaxis.y yaxis.y -zaxis.y 0
-xaxis.z yaxis.z -zaxis.z 0
dot(xaxis, eye) -dot(yaxis, eye) -dot(zaxis, eye) 1
Requisiti
Requisito | Valore |
---|---|
Intestazione |
|
Libreria |
|
Vedi anche