QuaternionSpline

A spline that uses spherical linear (slerp) interpolation to create a quaternion curve. The generated curve is in the class C1.

See also

Constructors

Link copied to clipboard

Types

Link copied to clipboard
sealed interface ConstructorOptions

Properties

Link copied to clipboard

An array of Quaternion control points.

Link copied to clipboard

An array of times for the control points.

Functions

Link copied to clipboard
fun clampTime(time: Double): Double

Clamps the given time to the period covered by the spline.

Link copied to clipboard
fun evaluate(time: Double, result: Quaternion? = definedExternally): Quaternion

Evaluates the curve at a given time.

Link copied to clipboard

Finds an index i in times such that the parameter time is in the interval [times[i], times[i + 1]].

Link copied to clipboard
fun wrapTime(time: Double): Double

Wraps the given time to the period covered by the spline.