new Spline()
创建一个曲线参数化和评估的时间。
- See:
-
- CatmullRomSpline
- HermiteSpline
- LinearSpline
- QuaternionSpline
Members
-
pointsArray.<Cartesian3> Array.<Quaternion>
-
控制点的阵列。
- Default Value: undefined
timesArray.<Number>
控制点的时间数组。
- Default Value: undefined
Methods
-
evaluate(time, result){Cartesian3|Quaternion}
-
在给定时间对曲线求值。
Name Type Description timeNumber 计算曲线的时间。
resultCartesian3 | Quaternion 可选 存储结果的对象。
Throws:
-
Time必须在
[t0,tn]范围内,其中t0是数组times中的第一个元素,tn是数组times中的最后一个元素。 - Type
- DeveloperError
Returns:
Type Description Cartesian3 | Quaternion 修改后的结果参数或给定时间内曲线上点的新实例。 -
-
findTimeInterval(time, startIndex){Number}
-
在
i中查找索引i,使得参数time在[times[i], times[i + 1]]区间。Name Type Description timeNumber 时间。
startIndexNumber 开始搜索的索引。
Throws:
-
Time必须在
[t0,tn]范围内,其中t0是数组times中的第一个元素,tn是数组times中的最后一个元素。 - Type
- DeveloperError
Returns:
Type Description Number 区间起点元素的索引。 -
-
wrapTime(time){number}
-
Wraps the given time to the period covered by the spline.
Name Type Description timenumber The time.
Returns:
Type Description number The time, wrapped around the animation period.