ConstantSpline

new Cesium.ConstantSpline(value)

计算结果为常量值的样条曲线。虽然这遵循 Spline 接口, 它不维护内部时间数组,因为它的值永远不会改变。
Name Type Description
value number | Cartesian3 | Quaternion 样条计算结果的常量值。
Example:
const position = new Cesium.Cartesian3(1.0, 2.0, 3.0);
const spline = new Cesium.ConstantSpline(position);

const p0 = spline.evaluate(0.0);
See:

Members

样条计算结果的常量值。

Methods

clampTime(time)number

将给定时间限制为样条所覆盖的时间段。
Name Type Description
time number 时间。
Returns:
时间,固定到动画周期。
在给定时间计算曲线。
Name Type Description
time number 评估曲线的时间。
result Cartesian3 | Quaternion optional 要在其上存储结果的对象。
Returns:
修改后的结果参数 或常量样条所表示的值。
times中查找索引 i,使得参数 times在区间 [times[i], times[i + 1]] 中。 由于常量样条没有内部 times 数组,这将引发错误。
Name Type Description
time number time.
Throws:
  • DeveloperError : findTimeInterval cannot be called on a ConstantSpline.

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.