HeadingPitchRoll

new Cesium.HeadingPitchRoll(heading, pitch, roll)

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.

Members

Gets or sets the heading.
Default Value: 0.0
Gets or sets the pitch.
Default Value: 0.0
Gets or sets the roll.
Default Value: 0.0

Methods

static Cesium.HeadingPitchRoll.clone(headingPitchRoll, result)HeadingPitchRoll

Duplicates a HeadingPitchRoll instance.
Name Type Description
headingPitchRoll HeadingPitchRoll The HeadingPitchRoll to duplicate.
result HeadingPitchRoll 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)

static Cesium.HeadingPitchRoll.equals(left, right)boolean

Compares the provided HeadingPitchRolls componentwise and returns true if they are equal, false otherwise.
Name Type Description
left HeadingPitchRoll optional The first HeadingPitchRoll.
right HeadingPitchRoll optional The second HeadingPitchRoll.
Returns:
true if left and right are equal, false otherwise.

static Cesium.HeadingPitchRoll.equalsEpsilon(left, right, relativeEpsilon, absoluteEpsilon)boolean

Compares the provided HeadingPitchRolls componentwise and returns true if they pass an absolute or relative tolerance test, false otherwise.
Name Type Default Description
left HeadingPitchRoll optional The first HeadingPitchRoll.
right HeadingPitchRoll optional The second HeadingPitchRoll.
relativeEpsilon number 0 optional The relative epsilon tolerance to use for equality testing.
absoluteEpsilon number relativeEpsilon optional The absolute epsilon tolerance to use for equality testing.
Returns:
true if left and right are within the provided epsilon, false otherwise.

static Cesium.HeadingPitchRoll.fromDegrees(heading, pitch, roll, result)HeadingPitchRoll

Returns a new HeadingPitchRoll instance from angles given in degrees.
Name Type Description
heading number the heading in degrees
pitch number the pitch in degrees
roll number the heading in degrees
result HeadingPitchRoll optional The object in which to store the result. If not provided, a new instance is created and returned.
Returns:
A new HeadingPitchRoll instance

static Cesium.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
quaternion Quaternion The quaternion from which to retrieve heading, pitch, and roll, all expressed in radians.
result HeadingPitchRoll 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.
Duplicates this HeadingPitchRoll instance.
Name Type Description
result HeadingPitchRoll optional The object onto which to store the result.
Returns:
The modified result parameter or a new HeadingPitchRoll instance if one was not provided.

equals(right)boolean

Compares this HeadingPitchRoll against the provided HeadingPitchRoll componentwise and returns true if they are equal, false otherwise.
Name Type Description
right HeadingPitchRoll optional The right hand side HeadingPitchRoll.
Returns:
true if they are equal, false otherwise.

equalsEpsilon(right, relativeEpsilon, absoluteEpsilon)boolean

Compares this HeadingPitchRoll against the provided HeadingPitchRoll componentwise and returns true if they pass an absolute or relative tolerance test, false otherwise.
Name Type Default Description
right HeadingPitchRoll optional The right hand side HeadingPitchRoll.
relativeEpsilon number 0 optional The relative epsilon tolerance to use for equality testing.
absoluteEpsilon number relativeEpsilon optional The absolute epsilon tolerance to use for equality testing.
Returns:
true if they are within the provided epsilon, false otherwise.
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)'.
Need help? The fastest way to get answers is from the community and team on the Cesium Forum.