QuaternionSpline

new Cesium.QuaternionSpline(options)

使用球形线性 (slerp) 插值创建四元数曲线的样条曲线。 生成的曲线属于 C类 1
Name Type Description
options object 对象,具有以下属性:
Name Type Description
times Array.<number> 每个点的严格递增、无单位的浮点时间数组。 这些值与 clock time 无关。它们是曲线的参数化。
points Array.<Quaternion> 个四元数 个控制点的数组。 需要 @exception {DeveloperError} 个时间点和时间
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:
修改后的结果参数或给定时间曲线上点的新实例。
Throws:
  • DeveloperError : time must be in the range [t0, tn], where t0 is the first element in the array times and tn is the last element in the array times.

findTimeInterval(time)number

times中查找索引 i,使得参数 times在区间 [times[i], times[i + 1]] 中。
Name Type Description
time number 时间。
Returns:
区间开始时元素的索引。
Throws:
  • DeveloperError : 时间必须在 [t0, tn] 范围内,其中 t0 是数组中的第一个元素 timestn 是最后一个元素 在数组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.