一个使用球面线性插值(slerp)生成四元数曲线的样条曲线。
生成的曲线是 C1 类。
| Name | Type | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
包含以下属性的对象:
|
Throws:
-
DeveloperError : points 和 times 是必需的。
-
DeveloperError : points.length 必须大于或等于 2。
-
DeveloperError : times.length 必须等于 points.length。
Members
readonly points : Array.<Quaternion>
Quaternion 控制点的数组。
控制点的时间数组。
Methods
将给定时间限制在样条曲线覆盖的周期内。
| Name | Type | Description |
|---|---|---|
time |
number | 时间。 |
Returns:
限制到动画周期的时间。
evaluate(time, result) → Quaternion
在给定时间评估曲线。
| Name | Type | Description |
|---|---|---|
time |
number | 要评估曲线的时间。 |
result |
Quaternion | optional 存储结果的对象。 |
Returns:
修改后的结果参数或在给定时间曲线上点的新实例。
Throws:
在
times 中找到一个索引 i,使参数
time 在区间 [times[i], times[i + 1]] 中。
| Name | Type | Description |
|---|---|---|
time |
number | 时间。 |
Returns:
表示区间开始的元素的索引。
Throws:
将给定时间限制在样条曲线覆盖的周期内。
| Name | Type | Description |
|---|---|---|
time |
number | 时间。 |
Returns:
围绕更新动画的时间。
