使用球面线性(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:
环绕更新后的动画时间。
