Microsoft DirectX 8.1 (C++) |
Performs a Hermite spline interpolation, using the specified 4-D vectors.
D3DXVECTOR4* D3DXVec4Hermite( D3DXVECTOR4* pOut, CONST D3DXVECTOR4* pV1, CONST D3DXVECTOR4* pT1, CONST D3DXVECTOR4* pV2, CONST D3DXVECTOR4* pT2, FLOAT s );
Pointer to a D3DXVECTOR4 structure that is the result of the Hermite spline interpolation.
The D3DXVec4Hermite function interpolates from (positionA, tangentA) to (positionB, tangentB) using Hermite spline interpolation. This function interpolates between the position V1 and the tangent T1, when s is equal to zero, and between the position V2 and the tangent T2, when s is equal to one.
Hermite splines are useful for controlling animation because the curve runs through all the control points. Also, because the position and tangent are explicitly specified at the ends of each segment, it is easy to create a C2 continuous curve as long as you make sure that your starting position and tangent match the ending values of the last segment.
The return value for this function is the same value returned in the pOut parameter. In this way, the D3DXVec4Hermite function can be used as a parameter for another function.
Header: Declared in D3dx8math.h.
Import Library: Use D3dx8.lib.