Funzione D3DXVec3Lerp

Nota

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

Esegue un'interpolazione lineare tra due vettori 3D.

Sintassi

D3DXVECTOR3* D3DXVec3Lerp(
  _Inout_       D3DXVECTOR3 *pOut,
  _In_    const D3DXVECTOR3 *pV1,
  _In_    const D3DXVECTOR3 *pV2,
  _In_          FLOAT       s
);

Parametri

pOut [in, out]

Tipo: D3DXVECTOR3*

Puntatore alla struttura D3DXVECTOR3 risultante dall'operazione.

pV1 [in]

Tipo: const D3DXVECTOR3*

Puntatore a una struttura D3DXVECTOR3 di origine.

pV2 [in]

Tipo: const D3DXVECTOR3*

Puntatore a una struttura D3DXVECTOR3 di origine.

s [in]

Tipo: FLOAT

Parametro che interpola in modo lineare tra i vettori.

Valore restituito

Tipo: D3DXVECTOR3*

Puntatore a una struttura D3DXVECTOR3 risultante dall'interpolazione lineare.

Commenti

Questa funzione esegue l'interpolazione lineare in base alla formula seguente: V1 + s(V2-V1).

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

Requisiti

Requisito Valore
Intestazione
D3dx9math.h
Libreria
D3dx9.lib

Vedi anche

Funzioni matematiche