CzmlUnitQuaternion
Provides methods for working with a unit Quaternion defined in CZML.
Members
-
<static> doublesPerInterpolationValue
-
The number of doubles per packed value used for interpolation.
-
<static> doublesPerValue
-
The number of doubles per packed Quaternion value.
Methods
-
<static> getValue
-
Given a non-sampled unwrapped interval, returns a Quaternion instance of the data.
Parameters:
Name Type Description unwrappedIntervalObject The result of CzmlUnitQuaternion.unwrapInterval. resultCartesian3 The object to store the result in, if undefined a new instance will be created. Returns:
The modified result parameter or a new Quaternion instance if result was not defined. -
<static> getValueFromArray
-
Given a packed array of x, y, z, and w values, extracts a Quaternion instance.
Parameters:
Name Type Description arrayArray A packed array of Quaternion values, where every four elements represents a Cartesian3. startingIndexNumber The index into the array that contains the x value of the Quaternion you would like. resultCartesian3 The object to store the result in, if undefined a new instance will be created. Returns:
The modified result parameter or a new Quaternion instance if result was not defined. -
<static> getValueFromInterpolationResult
-
Given a packed array of axis-angle rotations returned from CzmlUnitQuaternion.packValuesForInterpolation, converts the desired index into a unit Quaternion.
Parameters:
Name Type Description arrayArray The array containing the packed axis-angle rotations. resultQuaternion The object to store the result in, if undefined a new instance will be created. sourceArrayArray The source array of the original Quaternion values previously passed to CzmlUnitQuaternion.packValuesForInterpolation. firstIndexNumber The index previously passed to CzmlUnitQuaternion.packValuesForInterpolation. lastIndexNumber The index previously passed to CzmlUnitQuaternion.packValuesForInterpolation Returns:
The modified result parameter or a new Quaternion instance if result was not defined. -
<static> isSampled
-
Returns true if this interval represents data that should be interpolated by the client or false if it's a single value.
Parameters:
Name Type Description unwrappedIntervalObject The result of CzmlUnitQuaternion.unwrapInterval. -
<static> packValuesForInterpolation
-
Given a packed array of x, y, z, and w values, creates a packed array of Cartesian3 axis-angle rotations suitable for interpolation.
Parameters:
Name Type Description sourceArrayArray The packed array of quaternion values. destinationArrayArray The array to store the packed axis-angle rotations. firstIndexNumber The index of the first element to be packed. lastIndexNumber The index of the last element to be packed. -
<static> unwrapInterval
-
Returns the packed Quaternion representation contained within the provided CZML interval or undefined if the interval does not contain Quaternion data.
Parameters:
Name Type Description czmlIntervalObject The CZML interval to unwrap.
