# HeadingPitchRoll

#### new Cesium.HeadingPitchRoll(heading, pitch, roll)
Core/HeadingPitchRoll.js 24

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
Core/HeadingPitchRoll.js 94

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)

#### staticCesium.HeadingPitchRoll.equals(left, right) → Boolean
Core/HeadingPitchRoll.js 115

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.

#### staticCesium.HeadingPitchRoll.equalsEpsilon(left, right, relativeEpsilon, absoluteEpsilon) → Boolean
Core/HeadingPitchRoll.js 135

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 |  | 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.

#### staticCesium.HeadingPitchRoll.fromDegrees(heading, pitch, roll, result) → HeadingPitchRoll
Core/HeadingPitchRoll.js 66

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

#### staticCesium.HeadingPitchRoll.fromQuaternion(quaternion, result) → HeadingPitchRoll
Core/HeadingPitchRoll.js 37

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.

#### clone(result) → HeadingPitchRoll
Core/HeadingPitchRoll.js 150

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
Core/HeadingPitchRoll.js 161

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
Core/HeadingPitchRoll.js 175

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 |  | 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.

#### toString() → String
Core/HeadingPitchRoll.js 184

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)'.