main.cesium.Spline.kt Maven / Gradle / Ivy
// Automatically generated - do not modify!
package cesium
/**
* Creates a curve parameterized and evaluated by time. This type describes an interface
* and is not intended to be instantiated directly.
* @see Online Documentation
*/
@JsName("\$cesium__Spline")
abstract external class Spline {
/**
* An array of times for the control points.
* @see Online Documentation
*/
abstract var times: Array
/**
* An array of control points.
* @see Online Documentation
*/
abstract var points: dynamic
/**
* Evaluates the curve at a given time.
* @param [time] The time at which to evaluate the curve.
* @param [result] The object onto which to store the result.
* @return The modified result parameter or a new instance of the point on the curve at the given time.
* @see Online Documentation
*/
abstract fun evaluate(
time: Double,
result: dynamic = definedExternally,
): dynamic
/**
* Finds an index `i` in `times` such that the parameter
* `time` is in the interval `[times[i], times[i + 1]]`.
* @param [time] The time.
* @param [startIndex] The index from which to start the search.
* @return The index for the element at the start of the interval.
* @see Online Documentation
*/
abstract fun findTimeInterval(
time: Double,
startIndex: Int,
): Int
/**
* Wraps the given time to the period covered by the spline.
* @param [time] The time.
* @return The time, wrapped around the animation period.
* @see Online Documentation
*/
abstract fun wrapTime(time: Double): Double
/**
* Clamps the given time to the period covered by the spline.
* @param [time] The time.
* @return The time, clamped to the animation period.
* @see Online Documentation
*/
abstract fun clampTime(time: Double): Double
}