[−][src]Function directx_math::XMQuaternionSquad
pub fn XMQuaternionSquad(
Q0: FXMVECTOR,
Q1: FXMVECTOR,
Q2: FXMVECTOR,
Q3: GXMVECTOR,
t: f32
) -> FXMVECTOR
Interpolates between four unit quaternions, using spherical quadrangle interpolation.
Parameters
Q0
First unit quaternion.
Q1
Second unit quaternion.
Q2
Third unit quaternion.
Q3
Fourth unit quaternion.
t
Interpolation control factor.
Return value
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.
This method uses the following sequence of spherical linear interpolation operations.
Slerp(Slerp(q1, c, t), Slerp(a, b, t), 2t(1 - t))
Reference
https://docs.microsoft.com/en-us/windows/win32/api/directxmath/nf-directxmath-XMQuaternionSquad
https://docs.microsoft.com/en-us/previous-versions/windows/desktop/bb281656(v=vs.85)