Spline

new Cesium.Spline()

创建参数化的(parameterized)并按时间估算的曲线。此类型描述接口,不打算直接实例化。
See:

Members

points : Array.<Cartesian3>|Array.<Quaternion>

控制点数组。
Default Value: undefined

times : Array.<Number>

控制点的时间数组。
Default Value: undefined

Methods

clampTime(time)Number

将给定的时间固定(clamps)到样条曲线(spline)所覆盖的周期。
Name Type Description
time Number 时间。
Returns:
时间,固定的动画的周期。

evaluate(time, result)Cartesian3|Quaternion|Array.<Number>

在给定时间对曲线求值。
Name Type Description
time Number 对曲线求值的时间。
result Cartesian3 | Quaternion | Array.<Number> optional 存储结果的对象。
Returns:
在给定时间的修改结果参数或曲线上点的新实例。
Throws:
  • DeveloperError : 时间必须在[t0, tn]范围内, 其中t0是数组code>times中的第一个元素, 并且tn是数组times中的最后一个元素。

findTimeInterval(time, startIndex)Number

times中查找一个索引i,使得参数time 在区间[times[i], times[i + 1]]中。
Name Type Description
time Number 时间。
startIndex Number 用于开始搜索的索引。
Returns:
间隔开始时元素的索引。
Throws:
  • DeveloperError : 时间必须在[t0, tn]范围内, 其中t0是数组code>times中的第一个元素, 并且tn是数组times中的最后一个元素。

wrapTime(time)Number

将给定的时间封装到样条曲线(spline)所覆盖的周期中。
Name Type Description
time Number 时间。
Returns:
时间,环绕着动画的周期。