一个求值为常量值的样条曲线。尽管它遵循
Spline 接口,
但由于其值从不改变,因此它不维护内部的 times 数组。
| 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
readonly value : number|Cartesian3|Quaternion
样条曲线求值所得到的常量值。
Methods
将给定的时间钳制到样条曲线所覆盖的时段内。
| Name | Type | Description |
|---|---|---|
time |
number | 时间。 |
Returns:
被钳制到动画时段的时间。
evaluate(time, result) → number|Cartesian3|Quaternion
在给定时间对曲线求值。
| Name | Type | Description |
|---|---|---|
time |
number | 对曲线求值的时间。 |
result |
Cartesian3 | Quaternion | optional 用于存储结果的参数对象。 |
Returns:
被修改的结果参数,或常量样条曲线所表示的值。
在
times 中查找索引 i,使得参数
time 位于区间 [times[i], times[i + 1]] 内。
由于常量样条曲线没有内部的 times 数组,这将抛出错误。
| Name | Type | Description |
|---|---|---|
time |
number | 时间。 |
Throws:
-
DeveloperError :不能在 ConstantSpline 上调用 findTimeInterval。
将给定的时间环绕到样条曲线所覆盖的时段内。
| Name | Type | Description |
|---|---|---|
time |
number | 时间。 |
Returns:
环绕到更新后的动画的时间。
