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,使得参数 time 位于区间 [times[i], times[i + 1]] 内。 由于常量样条没有内部时间数组,调用此方法将抛出错误。
Name Type Description
time number 时间。
Throws:
  • DeveloperError : 不能在 ConstantSpline 上调用 findTimeInterval。

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.