Class: Spline

Spline

new Spline()

创建一个曲线参数化和评估的时间。

See:

Members

pointsArray.<Cartesian3> Array.<Quaternion>

控制点的阵列。

Default Value:
undefined

timesArray.<Number>

控制点的时间数组。

Default Value:
undefined

Methods

evaluate(time, result){Cartesian3|Quaternion}

在给定时间对曲线求值。

Name Type Description
time Number

计算曲线的时间。

result Cartesian3 | Quaternion 可选

存储结果的对象。

Throws:

Time必须在[t0,tn]范围内,其中t0是数组times中的第一个元素,tn是数组times中的最后一个元素。

Type
DeveloperError
Returns:
Type Description
Cartesian3 | Quaternion 修改后的结果参数或给定时间内曲线上点的新实例。

findTimeInterval(time, startIndex){Number}

i中查找索引i,使得参数time[times[i], times[i + 1]]区间

Name Type Description
time Number

时间。

startIndex Number

开始搜索的索引。

Throws:

Time必须在[t0,tn]范围内,其中t0是数组times中的第一个元素,tn是数组times中的最后一个元素。

Type
DeveloperError
Returns:
Type Description
Number 区间起点元素的索引。

wrapTime(time){number}

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

Name Type Description
time number

The time.

Returns:
Type Description
number The time, wrapped around the animation period.