表示始终对值进行插值的
Packable
数字
朝向最短的旋转角度。此对象从不直接使用
而是传递给SampledProperty
的构造函数
为了表示一个二维的旋转角度。Example:
var time1 = Cesium.JulianDate.fromIso8601('2010-05-07T00:00:00');
var time2 = Cesium.JulianDate.fromIso8601('2010-05-07T00:01:00');
var time3 = Cesium.JulianDate.fromIso8601('2010-05-07T00:02:00');
var property = new Cesium.SampledProperty(Cesium.Rotation);
property.addSample(time1, 0);
property.addSample(time3, Cesium.Math.toRadians(350));
//Getting the value at time2 will equal 355 degrees instead
//of 175 degrees (which is what you get if you construct
//a SampledProperty(Number) instead. Note, the actual
//return value is in radians, not degrees.
property.getValue(time2);
See:
Members
用于将对象打包到数组中的元素数。
Methods
staticCesium.Rotation.convertPackedArrayForInterpolation(packedArray, startingIndex, lastIndex, result)
将压缩数组转换为适合插值的形式。
Name | Type | Default | Description |
---|---|---|---|
packedArray |
Array.<Number> | 压缩数组。 | |
startingIndex |
Number |
0
|
optional 要转换的第一个元素的索引。 |
lastIndex |
Number |
packedArray.length
|
optional 要转换的最后一个元素的索引。 |
result |
Array.<Number> | 要将结果存储到其中的对象。 |
将提供的实例存储到提供的数组中。
Name | Type | Default | Description |
---|---|---|---|
value |
Rotation | 要打包的值。 | |
array |
Array.<Number> | 要打包到的数组。 | |
startingIndex |
Number |
0
|
optional 数组中开始打包元素的索引。 |
Returns:
被压缩到的数组
staticCesium.Rotation.unpack(array, startingIndex, result) → Rotation
从压缩数组检索实例。
Name | Type | Default | Description |
---|---|---|---|
array |
Array.<Number> | 压缩数组。 | |
startingIndex |
Number |
0
|
optional 要解包的元素的起始索引。 |
result |
Rotation | optional 要将结果存储到其中的对象。 |
Returns:
修改后的结果参数或新的旋转实例(如果未提供)。
staticCesium.Rotation.unpackInterpolationResult(array, sourceArray, firstIndex, lastIndex, result) → Rotation
从用
Rotation.convertPackedArrayForInterpolation
转换的压缩数组中检索实例。Name | Type | Default | Description |
---|---|---|---|
array |
Array.<Number> | 以前为插值而打包的数组。 | |
sourceArray |
Array.<Number> | 原始的压缩数组。 | |
firstIndex |
Number |
0
|
optional 用于转换数组的第一个索引。 |
lastIndex |
Number |
packedArray.length
|
optional 用于转换数组的最后一个索引。 |
result |
Rotation | optional 要将结果存储到其中的对象。 |
Returns:
修改后的结果参数或新的旋转实例(如果未提供)。