一个求值为常数值的样条曲线。虽然它遵循
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
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]] 内。
由于常数样条曲线没有内部时间数组,因此将抛出错误。
| Name | Type | Description |
|---|---|---|
time |
number | 时间。 |
Throws:
-
DeveloperError : 不能在 ConstantSpline 上调用 findTimeInterval。
将给定的时间包装到样条曲线覆盖的周期内。
| Name | Type | Description |
|---|---|---|
time |
number | 时间。 |
Returns:
时间,包装到更新后的动画中。
