D3DXQuaternionSquad function (D3dx9math.h)

Note

The D3DX utility library is deprecated. We recommend that you use DirectXMath instead.

Interpolates between quaternions, using spherical quadrangle interpolation.

Syntax

D3DXQUATERNION* D3DXQuaternionSquad(
  _Inout_       D3DXQUATERNION *pOut,
  _In_    const D3DXQUATERNION *pQ1,
  _In_    const D3DXQUATERNION *pA,
  _In_    const D3DXQUATERNION *pB,
  _In_    const D3DXQUATERNION *pC,
  _In_          FLOAT          t
);

Parameters

pOut [in, out]

Type: D3DXQUATERNION*

Pointer to the D3DXQUATERNION structure that is the result of the operation.

pQ1 [in]

Type: const D3DXQUATERNION*

Pointer to a source D3DXQUATERNION structure.

pA [in]

Type: const D3DXQUATERNION*

Pointer to a source D3DXQUATERNION structure.

pB [in]

Type: const D3DXQUATERNION*

Pointer to a source D3DXQUATERNION structure.

pC [in]

Type: const D3DXQUATERNION*

Pointer to a source D3DXQUATERNION structure.

t [in]

Type: FLOAT

Parameter that indicates how far to interpolate between the quaternions.

Return value

Type: D3DXQUATERNION*

Pointer to a D3DXQUATERNION structure that is the result of the spherical quadrangle interpolation.

Remarks

This function uses the following sequence of spherical linear interpolation operations:

Slerp(Slerp(pQ1, pC, t), Slerp(pA, pB, t), 2t(1 - t))

The return value for this function is the same value returned in the pOut parameter. In this way, the D3DXQuaternionSquad function can be used as a parameter for another function.

For an example of interpolating between quaternions, see the SkinnedMesh Sample. You can get this sample and learn about it from the DirectX SDK. For info about the DirectX SDK, see Where is the DirectX SDK?.

Use D3DXQuaternionNormalize for any quaternion input that is not already normalized.

Requirements

Requirement Value
Header
D3dx9math.h
Library
D3dx9.lib

See also

Math Functions

D3DXQuaternionExp

D3DXQuaternionLn

D3DXQuaternionSquadSetup