Funzione D3DXMatrixLookAtLH (D3dx9math.h)

Nota

La libreria di utilità D3DX è deprecata. È consigliabile usare invece DirectXMath .

Crea una matrice di aspetto sinistra.

Sintassi

D3DXMATRIX* D3DXMatrixLookAtLH(
  _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 risultante dall'operazione.

pEye [in]

Tipo: const D3DXVECTOR3*

Puntatore alla struttura D3DXVECTOR3 che definisce il punto oculare. 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 ricerca sinistra.

Commenti

Il valore restituito per questa funzione è lo stesso valore restituito nel parametro pOut . In questo modo, la funzione D3DXMatrixLookAtLH può essere usata come parametro per un'altra funzione.

Questa funzione usa la formula seguente per calcolare la matrice restituita.

zaxis = normal(At - Eye)
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
D3dx9math.h
Libreria
D3dx9.lib

Vedi anche

Funzioni matematiche

D3DXMatrixLookAtRH