Skip to content

KBE3D / KBCore / Cesium / Spline

类: Spline

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

属性

times

times: number[]

An array of times for the control points.


points

points: Cartesian3[] | Quaternion[]

An array of control points.

方法

evaluate()

evaluate(time: number, result?: Cartesian3 | number[] | Quaternion): Cartesian3 | number[] | Quaternion

Evaluates the curve at a given time.

参数

time

number

The time at which to evaluate the curve.

result?

The object onto which to store the result.

Cartesian3 | number[] | Quaternion

返回

Cartesian3 | number[] | Quaternion

The modified result parameter or a new instance of the point on the curve at the given time.


findTimeInterval()

findTimeInterval(time: number, startIndex: number): number

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

参数

time

number

The time.

startIndex

number

The index from which to start the search.

返回

number

The index for the element at the start of the interval.


wrapTime()

wrapTime(time: number): number

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

参数

time

number

The time.

返回

number

The time, wrapped around the animation period.


clampTime()

clampTime(time: number): number

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

参数

time

number

The time.

返回

number

The time, clamped to the animation period.

构造函数

构造函数

new Spline(): Spline

返回

Spline

KBE3D @3.0.0 Copyright © 2024-present KBE3D