Beispiel #1
0
	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);
		}
	}
Beispiel #2
0
    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));
        }
    }
Beispiel #3
0
	/// <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);
	}
Beispiel #4
0
 /// <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));
 }