QuaternionSpline

new Cesium.QuaternionSpline(options)

使用球形线性(slerp)插值创建四元数曲线的样条曲线。 生成的曲线属于C1类。
Name Type Description
options Object 具有以下属性的对象:
Name Type Description
times Array.<Number> 在每个点上严格递增的、无单位的浮点时间的数组。 这些值与时钟时间没有任何关系。它们是曲线的参数化。
points Array.<Quaternion> Quaternion控制点的数组。
Throws:
See:

Members

readonly points : Array.<Quaternion>

Quaternion个控制点组成的数组。

readonly times : Array.<Number>

控制点的时间数组。

Methods

clampTime(time)Number

将给定时间钳制到样条曲线覆盖的周期。
Name Type Description
time Number 时间。
Returns:
时间,固定到动画周期。

evaluate(time, result)Quaternion

在给定时间计算曲线。
Name Type Description
time Number 计算曲线的时间。
result Quaternion optional 要将结果存储到的对象。
Returns:
在给定时间修改的结果参数或曲线上点的新实例。
Throws:
  • DeveloperError :时间必须在[t0, tn]范围内,其中t0 是数组times中的第一个元素,tn是最后一个元素 在数组times中。

findTimeInterval(time)Number

fi将索引i放入times中,使参数 time[times[i], times[i + 1]]区间。
Name Type Description
time Number 时间。
Returns:
间隔开始时元素的索引。
Throws:
  • DeveloperError :时间必须在[t0, tn]范围内,其中t0 是数组times中的第一个元素,tn是最后一个元素 在数组times中。

wrapTime(time)Number

将给定时间包装为样条曲线覆盖的周期。
Name Type Description
time Number 时间。
Returns:
时间,绕到更新的动画。