public static Quaternion Interpolate(QuaternionInterpolationTarget[] normalizedTargets, QuaternionInterpolationMode interpType, ref Quaternion[] cache, float oneOverListLength) { switch (interpType) { case QuaternionInterpolationMode.Average: return InterpolateAverage(normalizedTargets); case QuaternionInterpolationMode.Slime: return InterpolateSlime(normalizedTargets); case QuaternionInterpolationMode.Longest: return SequentialSlerp(normalizedTargets, false, ref cache); default: return SequentialSlerp(normalizedTargets, true, ref cache); } }
public static Quaternion Interpolate(QuaternionInterpolationTarget[] normalizedTargets, QuaternionInterpolationMode interpType, ref Quaternion[] cache, float oneOverListLength) { switch (interpType) { case QuaternionInterpolationMode.Average: return(InterpolateAverage(normalizedTargets)); case QuaternionInterpolationMode.Slime: return(InterpolateSlime(normalizedTargets)); case QuaternionInterpolationMode.Longest: return(SequentialSlerp(normalizedTargets, false, ref cache)); default: return(SequentialSlerp(normalizedTargets, true, ref cache)); } }
/// <summary> /// Do an interpolation using the specified mode /// </summary> /// <param name="normalizedTargets"> /// A <see cref="QuaternionInterpolationTarget[]"/> /// </param> /// <param name="interpType"> /// A <see cref="QuaternionInterpolationMode"/> /// </param> /// <param name="cache"> /// A <see cref="Quaternion[]"/> /// </param> /// <returns> /// A <see cref="Quaternion"/> /// </returns> public static Quaternion Interpolate(QuaternionInterpolationTarget[] normalizedTargets, QuaternionInterpolationMode interpType, ref Quaternion[] cache) { // pass in denominator return Interpolate(normalizedTargets, interpType, ref cache, 1f/normalizedTargets.Length); }
/// <summary> /// Do an interpolation using the specified mode /// </summary> /// <param name="normalizedTargets"> /// A <see cref="QuaternionInterpolationTarget[]"/> /// </param> /// <param name="interpType"> /// A <see cref="QuaternionInterpolationMode"/> /// </param> /// <param name="cache"> /// A <see cref="Quaternion[]"/> /// </param> /// <returns> /// A <see cref="Quaternion"/> /// </returns> public static Quaternion Interpolate(QuaternionInterpolationTarget[] normalizedTargets, QuaternionInterpolationMode interpType, ref Quaternion[] cache) { // pass in denominator return(Interpolate(normalizedTargets, interpType, ref cache, 1f / normalizedTargets.Length)); }