QuaternionSpline

new Cesium.QuaternionSpline(options)

一条使用球面线性(slerp)插值来创建四元数曲线的样条。 生成的曲线属于 C1 类。
Name Type Description
options object Object with the following properties:
Name Type Description
times Array.<number> 在每个点处严格递增、无单位、浮点型的时间数组。 这些值与时钟时间没有任何关联。它们是曲线的参数化。
points Array.<Quaternion> Quaternion 控制点的数组。
Throws:
See:

Members

Quaternion 控制点的数组。

readonly times : Array.<number>

控制点的时间数组。

Methods

clampTime(time)number

将给定时间限制在样条所覆盖的周期内。
Name Type Description
time number 时间。
Returns:
被限制在动画周期内的时间。
在给定时间对曲线求值。
Name Type Description
time number 对曲线求值的时间。
result Quaternion optional 用于存储结果的对象。
Returns:
修改后的 result 参数,或给定时间曲线上该点的新实例。
Throws:
  • DeveloperError : time 必须位于范围 [t0, tn] 内,其中 t0 是数组 times 的第一个元素,tn 是数组 times 的最后一个元素。

findTimeInterval(time)number

times 中查找索引 i,使得参数 time 位于区间 [times[i], times[i + 1]] 内。
Name Type Description
time number 时间。
Returns:
区间起始处元素的索引。
Throws:
  • DeveloperError : time 必须位于范围 [t0, tn] 内,其中 t0 是数组 times 的第一个元素,tn 是数组 times 的最后一个元素。

wrapTime(time)number

将给定时间环绕到样条所覆盖的周期。
Name Type Description
time number 时间。
Returns:
环绕到更新后动画的时间。
需要帮助?获取答案的最快方式是在 Cesium 论坛 上向社区和团队提问。