Spline

new Cesium.Spline()

创建由时间参数化并评估的曲线。此类型描述了一个接口, 不打算直接实例化。
See:

Members

控制点数组。
Default Value: undefined

times : Array.<number>

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

Methods

clampTime(time)number

将给定时间钳制到样条覆盖的周期内。
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 : time 必须在范围 [t0, tn] 内,其中 t0 是数组 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 : time 必须在范围 [t0, tn] 内,其中 t0 是数组 times 的第一个元素,tn 是数组 times 的最后一个元素。

wrapTime(time)number

将给定时间环绕到样条覆盖的周期内。
Name Type Description
time number 时间。
Returns:
环绕到动画周期的时间。
Need help? The fastest way to get answers is from the community and team on the Cesium Forum.