XMQuaternionSquad

Interpolates between four unit quaternions, using spherical quadrangle interpolation.

Syntax

XMVECTOR XMQuaternionSquad(
         XMVECTOR Q0,
         XMVECTOR Q1,
         XMVECTOR Q2,
         GXMVECTOR Q3,
         float t
)  

Parameters

Q0
Type: XMVECTOR 

First unit quaternion.

Q1
Type: XMVECTOR 

Second unit quaternion.

Q2
Type: XMVECTOR 

Third unit quaternion.

Q3
Type: GXMVECTOR 

Fourth unit quaternion.

t
Type: float 

Interpolation control factor.

Return value

Type: XMVECTOR 

Returns the interpolated quaternion. If Q0, Q1, Q2, and Q3 are not all unit quaternions, the returned quaternion is undefined.

Remarks

The DirectXMath quaternion functions use an XMVECTOR 4-vector to represent quaternions, where the X, Y, and Z components are the vector part and the W component is the scalar part.

The use of this method requires some setup before its use. See XMQuaternionSquadSetup for details.

Requirements

Header: Declared in directxmath.h.