Represents a
Packable number that always interpolates values
towards the shortest angle of rotation. This object is never used directly
but is instead passed to the constructor of SampledProperty
in order to represent a two-dimensional angle of rotation.
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
-
The number of elements used to pack the object into an array.
Methods
-
Converts a packed array into a form suitable for interpolation.
Name Type Default Description packedArrayArray.<Number> The packed array. startingIndexNumber 0optional The index of the first element to be converted. lastIndexNumber packedArray.lengthoptional The index of the last element to be converted. resultArray.<Number> The object into which to store the result. -
Stores the provided instance into the provided array.
Name Type Default Description valueRotation The value to pack. arrayArray.<Number> The array to pack into. startingIndexNumber 0optional The index into the array at which to start packing the elements. Returns:
The array that was packed into -
staticCesium.Rotation.unpack(array, startingIndex, result) → Rotation
-
Retrieves an instance from a packed array.
Name Type Default Description arrayArray.<Number> The packed array. startingIndexNumber 0optional The starting index of the element to be unpacked. resultRotation optional The object into which to store the result. Returns:
The modified result parameter or a new Rotation instance if one was not provided. -
staticCesium.Rotation.unpackInterpolationResult(array, sourceArray, startingIndex, lastIndex, result) → Rotation
-
Retrieves an instance from a packed array converted with
Rotation.convertPackedArrayForInterpolation.Name Type Default Description arrayArray.<Number> The array previously packed for interpolation. sourceArrayArray.<Number> The original packed array. startingIndexNumber 0optional The startingIndex used to convert the array. lastIndexNumber packedArray.lengthoptional The lastIndex used to convert the array. resultRotation optional The object into which to store the result. Returns:
The modified result parameter or a new Rotation instance if one was not provided.
