using Unity.Mathematics; namespace UnityEngine.Splines { /// /// InterpolatorUtility provides easy access to all the different IInterpolator implementations. /// public static class InterpolatorUtility { static readonly IInterpolator s_LerpFloat = new Interpolators.LerpFloat(); static readonly IInterpolator s_LerpFloat2 = new Interpolators.LerpFloat2(); static readonly IInterpolator s_LerpFloat3 = new Interpolators.LerpFloat3(); static readonly IInterpolator s_LerpFloat4 = new Interpolators.LerpFloat4(); static readonly IInterpolator s_SlerpFloat2 = new Interpolators.SlerpFloat2(); static readonly IInterpolator s_SlerpFloat3 = new Interpolators.SlerpFloat3(); static readonly IInterpolator s_LerpQuaternion = new Interpolators.LerpQuaternion(); static readonly IInterpolator s_LerpColor = new Interpolators.LerpColor(); static readonly IInterpolator s_SmoothStepFloat = new Interpolators.SmoothStepFloat(); static readonly IInterpolator s_SmoothStepFloat2 = new Interpolators.SmoothStepFloat2(); static readonly IInterpolator s_SmoothStepFloat3 = new Interpolators.SmoothStepFloat3(); static readonly IInterpolator s_SmoothStepFloat4 = new Interpolators.SmoothStepFloat4(); static readonly IInterpolator s_SlerpQuaternion = new Interpolators.SlerpQuaternion(); /// /// Linearly interpolate between two values a and b by ratio t. /// public static IInterpolator LerpFloat => s_LerpFloat; /// /// Linearly interpolate between two values a and b by ratio t. /// public static IInterpolator LerpFloat2 => s_LerpFloat2; /// /// Linearly interpolate between two values a and b by ratio t. /// public static IInterpolator LerpFloat3 => s_LerpFloat3; /// /// Linearly interpolate between two values a and b by ratio t. /// public static IInterpolator LerpFloat4 => s_LerpFloat4; /// /// Spherically interpolate between two values a and b by ratio t. /// public static IInterpolator SlerpFloat2 => s_SlerpFloat2; /// /// Spherically interpolate between two values a and b by ratio t. /// public static IInterpolator SlerpFloat3 => s_SlerpFloat3; /// /// Linearly interpolate between two values a and b by ratio t. /// public static IInterpolator LerpQuaternion => s_LerpQuaternion; /// /// Linearly interpolate between two values a and b by ratio t. /// public static IInterpolator LerpColor => s_LerpColor; /// /// Interpolate between two values a and b by ratio t with smoothing at the start and end. /// public static IInterpolator SmoothStepFloat => s_SmoothStepFloat; /// /// Interpolate between two values a and b by ratio t with smoothing at the start and end. /// public static IInterpolator SmoothStepFloat2 => s_SmoothStepFloat2; /// /// Interpolate between two values a and b by ratio t with smoothing at the start and end. /// public static IInterpolator SmoothStepFloat3 => s_SmoothStepFloat3; /// /// Interpolate between two values a and b by ratio t with smoothing at the start and end. /// public static IInterpolator SmoothStepFloat4 => s_SmoothStepFloat4; /// /// Spherically interpolates between quaternions a and b by ratio t. The parameter t is clamped b the range [0, 1]. /// public static IInterpolator SlerpQuaternion => s_SlerpQuaternion; } }