A rotation expressed as a heading, pitch, and roll. Heading is the rotation about the
negative z axis. Pitch is the rotation about the negative y axis. Roll is the rotation about
the positive x axis.
| Name | Type | Default | Description |
|---|---|---|---|
heading |
Number |
0.0
|
optional The heading component in radians. |
pitch |
Number |
0.0
|
optional The pitch component in radians. |
roll |
Number |
0.0
|
optional The roll component in radians. |
Methods
-
staticCesium.HeadingPitchRoll.clone(headingPitchRoll, result) → HeadingPitchRoll
-
Duplicates a HeadingPitchRoll instance.
Name Type Description headingPitchRollHeadingPitchRoll The HeadingPitchRoll to duplicate. resultHeadingPitchRoll optional The object onto which to store the result. Returns:
The modified result parameter or a new HeadingPitchRoll instance if one was not provided. (Returns undefined if headingPitchRoll is undefined) -
Compares the provided HeadingPitchRolls componentwise and returns
trueif they are equal,falseotherwise.Name Type Description leftHeadingPitchRoll optional The first HeadingPitchRoll. rightHeadingPitchRoll optional The second HeadingPitchRoll. Returns:
trueif left and right are equal,falseotherwise. -
Compares the provided HeadingPitchRolls componentwise and returns
trueif they pass an absolute or relative tolerance test,falseotherwise.Name Type Default Description leftHeadingPitchRoll optional The first HeadingPitchRoll. rightHeadingPitchRoll optional The second HeadingPitchRoll. relativeEpsilonNumber The relative epsilon tolerance to use for equality testing. absoluteEpsilonNumber relativeEpsilonoptional The absolute epsilon tolerance to use for equality testing. Returns:
trueif left and right are within the provided epsilon,falseotherwise. -
staticCesium.HeadingPitchRoll.fromDegrees(heading, pitch, roll, result) → HeadingPitchRoll
-
Returns a new HeadingPitchRoll instance from angles given in degrees.
Name Type Description headingNumber the heading in degrees pitchNumber the pitch in degrees rollNumber the heading in degrees resultHeadingPitchRoll optional The object in which to store the result. If not provided, a new instance is created and returned. Returns:
A new HeadingPitchRoll instance -
staticCesium.HeadingPitchRoll.fromQuaternion(quaternion, result) → HeadingPitchRoll
-
Computes the heading, pitch and roll from a quaternion (see http://en.wikipedia.org/wiki/Conversion_between_quaternions_and_Euler_angles )
Name Type Description quaternionQuaternion The quaternion from which to retrieve heading, pitch, and roll, all expressed in radians. resultQuaternion optional The object in which to store the result. If not provided, a new instance is created and returned. Returns:
The modified result parameter or a new HeadingPitchRoll instance if one was not provided. -
clone(result) → HeadingPitchRoll
-
Duplicates this HeadingPitchRoll instance.
Name Type Description resultHeadingPitchRoll optional The object onto which to store the result. Returns:
The modified result parameter or a new HeadingPitchRoll instance if one was not provided. -
Compares this HeadingPitchRoll against the provided HeadingPitchRoll componentwise and returns
trueif they are equal,falseotherwise.Name Type Description rightHeadingPitchRoll optional The right hand side HeadingPitchRoll. Returns:
trueif they are equal,falseotherwise. -
Compares this HeadingPitchRoll against the provided HeadingPitchRoll componentwise and returns
trueif they pass an absolute or relative tolerance test,falseotherwise.Name Type Default Description rightHeadingPitchRoll optional The right hand side HeadingPitchRoll. relativeEpsilonNumber The relative epsilon tolerance to use for equality testing. absoluteEpsilonNumber relativeEpsilonoptional The absolute epsilon tolerance to use for equality testing. Returns:
trueif they are within the provided epsilon,falseotherwise. -
Creates a string representing this HeadingPitchRoll in the format '(heading, pitch, roll)' in radians.
Returns:
A string representing the provided HeadingPitchRoll in the format '(heading, pitch, roll)'.
