public final class YawPitchRoll extends Object implements IEquatable<YawPitchRoll>, ImmutableValueType
ElementaryRotations
about a reference set of axes. The orientation and associated set of axes which result from the first elementary rotation
are modified by a second elementary rotation, again performed about the original reference set of axes.
Likewise, the third elementary rotation is performed about the original reference set of axes to further modify
the orientation. This differs from an EulerSequence
where the sequence
of rotations are performed about the consecutive set of axes which result from the successive elementary rotations.
To obtain the yaw (heading), pitch (elevation), and roll (bank) orientation of the vehicle body axis relative
to a local NorthEastDown
axes of the vehicle
as a series of consecutive elementary rotations, use a 321 EulerSequence
.
Constructor and Description 

YawPitchRoll()
Initializes a new instance.

YawPitchRoll(AngleAxisRotation rotation,
YawPitchRollIndicator sequence)
Initializes a
EulerSequence sequence from the provided AngleAxisRotation and sequence. 
YawPitchRoll(double angle1,
double angle2,
double angle3,
YawPitchRollIndicator sequence)
Initializes a
YawPitchRoll sequence from the provided angles and sequence. 
YawPitchRoll(ElementaryRotation firstRotation,
ElementaryRotation secondRotation,
ElementaryRotation thirdRotation)
Initializes a
YawPitchRoll sequence from the provided ElementaryRotation instances. 
YawPitchRoll(EulerSequence sequence)
Initializes a
YawPitchRoll sequence from the provided EulerSequence . 
YawPitchRoll(Matrix3By3 matrix,
YawPitchRollIndicator sequence)
Initializes a
YawPitchRoll sequence from the provided Matrix3By3 and sequence. 
YawPitchRoll(UnitQuaternion quaternion,
YawPitchRollIndicator sequence)
Initializes a
YawPitchRoll sequence from the provided UnitQuaternion and sequence. 
Modifier and Type  Method and Description 

boolean 
equals(Object obj)
Indicates whether another object is exactly equal to this instance.

static boolean 
equals(YawPitchRoll left,
YawPitchRoll right)
Returns
true if the two instances are exactly equal. 
boolean 
equalsEpsilon(YawPitchRoll other,
double epsilon)
Returns
true if all of the elements of this quaternion are within epsilon
of the same elements of the specified quaternion. 
boolean 
equalsType(YawPitchRoll other)
Indicates whether another instance of this type is exactly equal to this instance.

static AxisIndicator 
firstAxis(YawPitchRollIndicator sequence)
Determines the first axis indicator from the provided
YawPitchRollIndicator . 
ElementaryRotation 
getFirstRotation()
Gets the first rotation.

ElementaryRotation 
getSecondRotation()
Gets the second rotation.

YawPitchRollIndicator 
getSequence()
Gets the order of the axes rotations for this instance.

ElementaryRotation 
getThirdRotation()
Gets the third rotation.

int 
hashCode()
Returns a hash code for this instance, which is suitable for use in hashing algorithms and data structures like a hash table.

static YawPitchRollIndicator 
indicator(AxisIndicator first,
AxisIndicator second,
AxisIndicator third)
Composes a
YawPitchRollIndicator from three individual AxisIndicator items. 
YawPitchRoll 
invert()
Inverts this instance, yielding a new
YawPitchRoll sequence. 
static boolean 
notEquals(YawPitchRoll left,
YawPitchRoll right)
Returns
true if the two instances are not exactly equal. 
static AxisIndicator 
secondAxis(YawPitchRollIndicator sequence)
Determines the second axis indicator from the provided
YawPitchRollIndicator . 
static AxisIndicator 
thirdAxis(YawPitchRollIndicator sequence)
Determines the third axis indicator from the provided
YawPitchRollIndicator . 
String 
toString()
Returns the value of this set of
YawPitchRoll coordinates in the form "first rotation, second rotation, third rotation" 
public YawPitchRoll()
public YawPitchRoll(double angle1, double angle2, double angle3, @Nonnull YawPitchRollIndicator sequence)
YawPitchRoll
sequence from the provided angles and sequence.angle1
 The first angle.angle2
 The second angle.angle3
 The third angle.sequence
 The sequence.public YawPitchRoll(@Nonnull ElementaryRotation firstRotation, @Nonnull ElementaryRotation secondRotation, @Nonnull ElementaryRotation thirdRotation)
YawPitchRoll
sequence from the provided ElementaryRotation
instances.firstRotation
 The first rotation.secondRotation
 The second rotation.thirdRotation
 The third rotation.public YawPitchRoll(@Nonnull EulerSequence sequence)
YawPitchRoll
sequence from the provided EulerSequence
.sequence
 The Euler sequence.public YawPitchRoll(@Nonnull Matrix3By3 matrix, @Nonnull YawPitchRollIndicator sequence)
YawPitchRoll
sequence from the provided Matrix3By3
and sequence.
Note that the matrix
must be an orthogonal rotation matrix.
matrix
 The orthogonal rotation matrix.sequence
 The sequence.public YawPitchRoll(@Nonnull UnitQuaternion quaternion, @Nonnull YawPitchRollIndicator sequence)
YawPitchRoll
sequence from the provided UnitQuaternion
and sequence.quaternion
 The unit quaternion.sequence
 The sequence.public YawPitchRoll(@Nonnull AngleAxisRotation rotation, @Nonnull YawPitchRollIndicator sequence)
EulerSequence
sequence from the provided AngleAxisRotation
and sequence.rotation
 The rotation.sequence
 The sequence.@Nonnull public static YawPitchRollIndicator indicator(@Nonnull AxisIndicator first, @Nonnull AxisIndicator second, @Nonnull AxisIndicator third)
YawPitchRollIndicator
from three individual AxisIndicator
items.first
 The first axis of rotation.second
 The second axis of rotation.third
 The third axis of rotation.@Nonnull public static AxisIndicator firstAxis(@Nonnull YawPitchRollIndicator sequence)
YawPitchRollIndicator
.sequence
 The order of the axes of rotation.@Nonnull public static AxisIndicator secondAxis(@Nonnull YawPitchRollIndicator sequence)
YawPitchRollIndicator
.sequence
 The order of the axes of rotation.@Nonnull public static AxisIndicator thirdAxis(@Nonnull YawPitchRollIndicator sequence)
YawPitchRollIndicator
.sequence
 The order of the axes of rotation.@Nonnull public final ElementaryRotation getFirstRotation()
@Nonnull public final ElementaryRotation getSecondRotation()
@Nonnull public final ElementaryRotation getThirdRotation()
@Nonnull public final YawPitchRollIndicator getSequence()
@Nonnull public final YawPitchRoll invert()
YawPitchRoll
sequence.YawPitchRoll
.public boolean equals(Object obj)
equals
in class Object
obj
 The object to compare to this instance.true
if obj
is an instance of this type and represents the same value as this instance; otherwise, false
.Object.hashCode()
,
HashMap
public final boolean equalsType(@Nonnull YawPitchRoll other)
equalsType
in interface IEquatable<YawPitchRoll>
other
 The instance to compare to this instance.true
if other
represents the same value as this instance; otherwise, false
.public final boolean equalsEpsilon(@Nonnull YawPitchRoll other, double epsilon)
true
if all of the elements of this quaternion are within epsilon
of the same elements of the specified quaternion. That is, in order for the quaternions to be
considered equal (and for this function to return true
), the absolute value of the
difference between each of their elements must be less than or equal to epsilon
.other
 The Quaternion to compare to this quaternion.epsilon
 The largest difference between the elements of the quaternions for which they will be considered equal.true
if the quaternions are equal as defined by the epsilon value.public int hashCode()
hashCode
in class Object
Object.equals(java.lang.Object)
,
System.identityHashCode(java.lang.Object)
public String toString()
YawPitchRoll
coordinates in the form "first rotation, second rotation, third rotation"public static boolean equals(@Nonnull YawPitchRoll left, @Nonnull YawPitchRoll right)
true
if the two instances are exactly equal.left
 The instance to compare to right
.right
 The instance to compare to left
.true
if left
represents the same value as right
; otherwise, false
.public static boolean notEquals(@Nonnull YawPitchRoll left, @Nonnull YawPitchRoll right)
true
if the two instances are not exactly equal.left
 The instance to compare to right
.right
 The instance to compare to left
.true
if left
does not represent the same value as right
; otherwise, false
.