A spline that evaluates to a constant value. Although this follows the
Spline
interface,
it does not maintain an internal array of times since its value never changes.
参数名称 | 类型 | 描述信息 |
---|---|---|
value |
number | Cartesian3 | Quaternion | The constant value that the spline evaluates to. |
使用示例:
const position = new Cesium.Cartesian3(1.0, 2.0, 3.0);
const spline = new Cesium.ConstantSpline(position);
const p0 = spline.evaluate(0.0);
参考:
成员(属性)
readonly value : number|Cartesian3|Quaternion
The constant value that the spline evaluates to.
方法
Clamps the given time to the period covered by the spline.
参数名称 | 类型 | 描述信息 |
---|---|---|
time |
number | The time. |
返回值:
The time, clamped to the animation period.
evaluate(time, result) → number|Cartesian3|Quaternion
Evaluates the curve at a given time.
参数名称 | 类型 | 描述信息 |
---|---|---|
time |
number | The time at which to evaluate the curve. |
result |
Cartesian3 | Quaternion | 可选 The object onto which to store the result. |
返回值:
The modified result parameter or the value that the constant spline represents.
Finds an index
i
in times
such that the parameter
time
is in the interval [times[i], times[i + 1]]
.
Since a constant spline has no internal times array, this will throw an error.
参数名称 | 类型 | 描述信息 |
---|---|---|
time |
number | The time. |
Throws:
-
DeveloperError : findTimeInterval cannot be called on a ConstantSpline.
Wraps the given time to the period covered by the spline.
参数名称 | 类型 | 描述信息 |
---|---|---|
time |
number | The time. |
返回值:
The time, wrapped around to the updated animation.