ConstantSpline

external class ConstantSpline(val value: Any)(source)

A spline that evaluates to a constant value. Although this follows the Spline interface, it does not maintain an internal array of times since its value never changes.

const position = new Cartesian3(1.0, 2.0, 3.0);
const spline = new ConstantSpline(position);

const p0 = spline.evaluate(0.0);

See also

Constructors

Link copied to clipboard
constructor(value: Any)

Properties

Link copied to clipboard
val value: Any

The constant value that the spline evaluates to.

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: Any? = definedExternally): Any

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.