new HeadingPitchRoll(headingopt, pitchopt, rollopt)
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.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
heading |
Number |
<optional> |
0.0 | The heading component in radians. |
pitch |
Number |
<optional> |
0.0 | The pitch component in radians. |
roll |
Number |
<optional> |
0.0 | The roll component in radians. |
- Source:
Methods
(static) clone(headingPitchRoll, resultopt) → {HeadingPitchRoll}
Duplicates a HeadingPitchRoll instance.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
headingPitchRoll |
HeadingPitchRoll | The HeadingPitchRoll to duplicate. | |
result |
HeadingPitchRoll |
<optional> |
The object onto which to store the result. |
- Source:
Returns:
The modified result parameter or a new HeadingPitchRoll instance if one was not provided. (Returns undefined if headingPitchRoll is undefined)
- Type
- HeadingPitchRoll
(static) equals(leftopt, rightopt) → {Boolean}
Compares the provided HeadingPitchRolls componentwise and returns
true
if they are equal, false
otherwise.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
left |
HeadingPitchRoll |
<optional> |
The first HeadingPitchRoll. |
right |
HeadingPitchRoll |
<optional> |
The second HeadingPitchRoll. |
- Source:
Returns:
true
if left and right are equal, false
otherwise.
- Type
- Boolean
(static) equalsEpsilon(leftopt, rightopt, relativeEpsilon, absoluteEpsilonopt) → {Boolean}
Compares the provided HeadingPitchRolls componentwise and returns
true
if they pass an absolute or relative tolerance test,
false
otherwise.
Parameters:
Name | Type | Attributes | 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 |
<optional> |
relativeEpsilon | The absolute epsilon tolerance to use for equality testing. |
- Source:
Returns:
true
if left and right are within the provided epsilon, false
otherwise.
- Type
- Boolean
(static) fromDegrees(heading, pitch, roll, resultopt) → {HeadingPitchRoll}
Returns a new HeadingPitchRoll instance from angles given in degrees.
Parameters:
Name | Type | Attributes | 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. |
- Source:
Returns:
A new HeadingPitchRoll instance
- Type
- HeadingPitchRoll
(static) fromQuaternion(quaternion, resultopt) → {HeadingPitchRoll}
Computes the heading, pitch and roll from a quaternion (see http://en.wikipedia.org/wiki/Conversion_between_quaternions_and_Euler_angles )
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
quaternion |
Quaternion | The quaternion from which to retrieve heading, pitch, and roll, all expressed in radians. | |
result |
Quaternion |
<optional> |
The object in which to store the result. If not provided, a new instance is created and returned. |
- Source:
Returns:
The modified result parameter or a new HeadingPitchRoll instance if one was not provided.
- Type
- HeadingPitchRoll
clone(resultopt) → {HeadingPitchRoll}
Duplicates this HeadingPitchRoll instance.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
result |
HeadingPitchRoll |
<optional> |
The object onto which to store the result. |
- Source:
Returns:
The modified result parameter or a new HeadingPitchRoll instance if one was not provided.
- Type
- HeadingPitchRoll
equals(rightopt) → {Boolean}
Compares this HeadingPitchRoll against the provided HeadingPitchRoll componentwise and returns
true
if they are equal, false
otherwise.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
right |
HeadingPitchRoll |
<optional> |
The right hand side HeadingPitchRoll. |
- Source:
Returns:
true
if they are equal, false
otherwise.
- Type
- Boolean
equalsEpsilon(rightopt, relativeEpsilon, absoluteEpsilonopt) → {Boolean}
Compares this HeadingPitchRoll against the provided HeadingPitchRoll componentwise and returns
true
if they pass an absolute or relative tolerance test,
false
otherwise.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
right |
HeadingPitchRoll |
<optional> |
The right hand side HeadingPitchRoll. | |
relativeEpsilon |
Number | The relative epsilon tolerance to use for equality testing. | ||
absoluteEpsilon |
Number |
<optional> |
relativeEpsilon | The absolute epsilon tolerance to use for equality testing. |
- Source:
Returns:
true
if they are within the provided epsilon, false
otherwise.
- Type
- Boolean
toString() → {String}
Creates a string representing this HeadingPitchRoll in the format '(heading, pitch, roll)' in radians.
- Source:
Returns:
A string representing the provided HeadingPitchRoll in the format '(heading, pitch, roll)'.
- Type
- String