quat_interpolateT_quat_interpolateQuatInterpolateQuatInterpolate (Operator)

Name

quat_interpolateT_quat_interpolateQuatInterpolateQuatInterpolate — Interpolation of two quaternions.

Signature

quat_interpolate( : : QuaternionStart, QuaternionEnd, InterpPos : QuaternionInterpolated)

Herror T_quat_interpolate(const Htuple QuaternionStart, const Htuple QuaternionEnd, const Htuple InterpPos, Htuple* QuaternionInterpolated)

void QuatInterpolate(const HTuple& QuaternionStart, const HTuple& QuaternionEnd, const HTuple& InterpPos, HTuple* QuaternionInterpolated)

HQuaternion HQuaternion::QuatInterpolate(const HQuaternion& QuaternionEnd, const HTuple& InterpPos) const

static void HOperatorSet.QuatInterpolate(HTuple quaternionStart, HTuple quaternionEnd, HTuple interpPos, out HTuple quaternionInterpolated)

HQuaternion HQuaternion.QuatInterpolate(HQuaternion quaternionEnd, HTuple interpPos)

Description

The operator quat_interpolatequat_interpolateQuatInterpolateQuatInterpolateQuatInterpolate interpolates the two quaternions QuaternionStartQuaternionStartQuaternionStartQuaternionStartquaternionStart and QuaternionEndQuaternionEndQuaternionEndQuaternionEndquaternionEnd at the interpolation position InterpPosInterpPosInterpPosInterpPosinterpPos. This position must lie within the interval [0,1]. In the case of InterpPosInterpPosInterpPosInterpPosinterpPos=0, the interpolated quaternion QuaternionInterpolatedQuaternionInterpolatedQuaternionInterpolatedQuaternionInterpolatedquaternionInterpolated corresponds to QuaternionStartQuaternionStartQuaternionStartQuaternionStartquaternionStart. In the case of InterpPosInterpPosInterpPosInterpPosinterpPos=1, the interpolated quaternion QuaternionInterpolatedQuaternionInterpolatedQuaternionInterpolatedQuaternionInterpolatedquaternionInterpolated corresponds to QuaternionEndQuaternionEndQuaternionEndQuaternionEndquaternionEnd.

The interpolation is done using spherical linear interpolation. As a consequence if both QuaternionStartQuaternionStartQuaternionStartQuaternionStartquaternionStart and QuaternionEndQuaternionEndQuaternionEndQuaternionEndquaternionEnd are rotation quaternions, QuaternionInterpolatedQuaternionInterpolatedQuaternionInterpolatedQuaternionInterpolatedquaternionInterpolated will be a rotation quaternion as well. Further, if InterpPosInterpPosInterpPosInterpPosinterpPos is increased at constant speed, a point on the unit sphere that is rotated using QuaternionInterpolatedQuaternionInterpolatedQuaternionInterpolatedQuaternionInterpolatedquaternionInterpolated travels with constant speed on an arc on the unit sphere.

Execution Information

Parameters

QuaternionStartQuaternionStartQuaternionStartQuaternionStartquaternionStart (input_control)  quaternion HQuaternion, HTupleHTupleHtuple (real) (double) (double) (double)

Start quaternion.

QuaternionEndQuaternionEndQuaternionEndQuaternionEndquaternionEnd (input_control)  quaternion HQuaternion, HTupleHTupleHtuple (real) (double) (double) (double)

End quaternion.

InterpPosInterpPosInterpPosInterpPosinterpPos (input_control)  real-array HTupleHTupleHtuple (real) (double) (double) (double)

Interpolation parameter.

Default value: 0.5

Suggested values: 0.0, 0.25, 0.5, 0.75, 1.0

QuaternionInterpolatedQuaternionInterpolatedQuaternionInterpolatedQuaternionInterpolatedquaternionInterpolated (output_control)  quaternion HQuaternion, HTupleHTupleHtuple (real) (double) (double) (double)

Interpolated quaternion.

Possible Predecessors

axis_angle_to_quataxis_angle_to_quatAxisAngleToQuatAxisAngleToQuatAxisAngleToQuat, quat_normalizequat_normalizeQuatNormalizeQuatNormalizeQuatNormalize

Possible Successors

quat_to_hom_mat3dquat_to_hom_mat3dQuatToHomMat3dQuatToHomMat3dQuatToHomMat3d, quat_rotate_point_3dquat_rotate_point_3dQuatRotatePoint3dQuatRotatePoint3dQuatRotatePoint3d, quat_to_posequat_to_poseQuatToPoseQuatToPoseQuatToPose

See also

quat_rotate_point_3dquat_rotate_point_3dQuatRotatePoint3dQuatRotatePoint3dQuatRotatePoint3d, quat_conjugatequat_conjugateQuatConjugateQuatConjugateQuatConjugate, quat_composequat_composeQuatComposeQuatComposeQuatCompose, dual_quat_interpolatedual_quat_interpolateDualQuatInterpolateDualQuatInterpolateDualQuatInterpolate

Module

Foundation