使用分段线性插值创建曲线的样条曲线。
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object | 具有以下属性的对象:
|
Throws:
-
DeveloperError : 点.长度必须大于或等于2。
-
DeveloperError : 时间长度必须等于点.长度.
Example:
var times = [ 0.0, 1.5, 3.0, 4.5, 6.0 ];
var spline = new Cesium.LinearSpline({
times : times,
points : [
new Cesium.Cartesian3(1235398.0, -4810983.0, 4146266.0),
new Cesium.Cartesian3(1372574.0, -5345182.0, 4606657.0),
new Cesium.Cartesian3(-757983.0, -5542796.0, 4514323.0),
new Cesium.Cartesian3(-2821260.0, -5248423.0, 4021290.0),
new Cesium.Cartesian3(-2539788.0, -4724797.0, 3620093.0)
]
});
var p0 = spline.evaluate(times[0]);
See:
Members
readonly points : Array.<Cartesian3>
由
Cartesian3
个控制点组成的数组。控制点的时间数组。
Methods
将给定时间钳制到样条曲线覆盖的周期。
Name | Type | Description |
---|---|---|
time |
Number | 时间。 |
Returns:
时间,固定到动画周期。
evaluate(time, result) → Cartesian3
在给定时间计算曲线。
Name | Type | Description |
---|---|---|
time |
Number | 计算曲线的时间。 |
result |
Cartesian3 | optional 要将结果存储到的对象。 |
Returns:
在给定时间修改的结果参数或曲线上点的新实例。
Throws:
f
i
将索引i放入times
中,使参数
time
在[times[i], times[i + 1]]
区间。Name | Type | Description |
---|---|---|
time |
Number | 时间。 |
Returns:
间隔开始时元素的索引。
Throws:
将给定时间包装为样条曲线覆盖的周期。
Name | Type | Description |
---|---|---|
time |
Number | 时间。 |
Returns:
时间,绕到更新的动画。