Spline

abstract external class Spline(source)

Creates a curve parameterized and evaluated by time. This type describes an interface and is not intended to be instantiated directly.

See also

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
abstract var points: ReadonlyArray<Any>

An array of control points.

Link copied to clipboard
abstract var times: ReadonlyArray<Double>

An array of times for the control points.

Functions

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

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

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

Evaluates the curve at a given time.

Link copied to clipboard
abstract fun findTimeInterval(time: Double, startIndex: Int): Int

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

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

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