public final class RotationVectorAngularVelocity extends Object implements IEquatable<RotationVectorAngularVelocity>, ImmutableValueType
Cartesian
rotation vectors combined with Cartesian
body-fixed angular velocity vectors.
Contains static methods that can convert this data type to UnitQuaternion
,
Motion
<UnitQuaternion
, Cartesian
>, and other related types.
Constructor and Description |
---|
RotationVectorAngularVelocity()
Initializes a new instance.
|
RotationVectorAngularVelocity(Cartesian rotationVector,
Cartesian angularVelocity)
Initializes this type directly from a rotation vector and a body-fixed angular velocity.
|
RotationVectorAngularVelocity(double[] elements)
Initializes a set of
RotationVectorAngularVelocity coordinates from the first 6 consecutive elements in the provided array. |
RotationVectorAngularVelocity(double[] elements,
int startIndex)
Initializes a set of
RotationVectorAngularVelocity coordinates from 6 consecutive elements in the provided array. |
RotationVectorAngularVelocity(double x,
double y,
double z,
double omegaX,
double omegaY,
double omegaZ)
Initializes this type from rotation vector and angular velocity components.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj)
Indicates whether another object is exactly equal to this instance.
|
static boolean |
equals(RotationVectorAngularVelocity left,
RotationVectorAngularVelocity right)
An equality operator overload that compares two
RotationVectorAngularVelocity objects. |
boolean |
equalsType(RotationVectorAngularVelocity other)
Indicates whether another instance of this type is exactly equal to this instance.
|
Cartesian |
getAngularVelocity()
Gets the body-fixed angular velocity of the rigid-body.
|
double |
getOmegaX()
Gets the body-fixed angular velocity coordinate along the positive x-axis.
|
double |
getOmegaY()
Gets the body-fixed angular velocity coordinate along the positive y-axis.
|
double |
getOmegaZ()
Gets the body-fixed angular velocity coordinate along the positive z-axis.
|
Cartesian |
getRotationVector()
Gets the rotation vector, which is the rotation angle times the rotation axis.
|
double |
getX()
Gets the rotation vector coordinate along the positive x-axis.
|
double |
getY()
Gets the rotation vector coordinate along the positive y-axis.
|
double |
getZ()
Gets the rotation vector coordinate along the positive z-axis.
|
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 boolean |
notEquals(RotationVectorAngularVelocity left,
RotationVectorAngularVelocity right)
An inequality operator overload that compares two
RotationVectorAngularVelocity objects. |
static UnitQuaternion |
rotationVectorToUnitQuaternion(Cartesian rotationVector)
Converts a rotation vector to a unit quaternion.
|
static DateMotionCollection1<RotationVectorAngularVelocity> |
toDateMotionCollectionRotationVectorAngularVelocity(DateMotionCollection2<UnitQuaternion,Cartesian> inputCollection,
int order)
Converts a
DateMotionCollection <UnitQuaternion , Cartesian > to a DateMotionCollection <RotationVectorAngularVelocity >. |
static DateMotionCollection2<UnitQuaternion,Cartesian> |
toDateMotionCollectionUnitQuaternionCartesian(DateMotionCollection1<RotationVectorAngularVelocity> inputCollection,
int order)
Converts a
DateMotionCollection <RotationVectorAngularVelocity > to a DateMotionCollection <UnitQuaternion , Cartesian >. |
static Motion1<RotationVectorAngularVelocity> |
toMotionRotationVectorAngularVelocity(Motion2<UnitQuaternion,Cartesian> motionUnitQuaternionCartesian,
int order)
|
static Motion2<UnitQuaternion,Cartesian> |
toMotionUnitQuaternionCartesian(Motion1<RotationVectorAngularVelocity> motionRotationVectorAngularVelocity,
int order)
|
static Motion2<UnitQuaternion,Cartesian> |
toMotionUnitQuaternionCartesian(RotationVectorAngularVelocity rotationVectorAngularVelocity,
int order)
|
static RotationVectorAngularVelocity |
toRotationVectorAngularVelocity(Motion2<UnitQuaternion,Cartesian> motionUnitQuaternionCartesian)
|
static Cartesian |
unitQuaternionToRotationVector(UnitQuaternion unitQuaternion)
Converts a unit quaternion to a rotation vector.
|
public RotationVectorAngularVelocity()
public RotationVectorAngularVelocity(@Nonnull Cartesian rotationVector, @Nonnull Cartesian angularVelocity)
rotationVector
- The rotation vector whose magnitude is a rotation angle and whose direction is a rotation axis.angularVelocity
- The body-fixed angular velocity of a rigid-body.public RotationVectorAngularVelocity(double x, double y, double z, double omegaX, double omegaY, double omegaZ)
x
- The x-component of the rotation vector.y
- The y-component of the rotation vector.z
- The z-component of the rotation vector.omegaX
- The x-component of the body-fixed angular velocity.omegaY
- The y-component of the body-fixed angular velocity.omegaZ
- The z-component of the body-fixed angular velocity.public RotationVectorAngularVelocity(@Nonnull double[] elements)
RotationVectorAngularVelocity
coordinates from the first 6 consecutive elements in the provided array.elements
- The array of coordinate values.ArgumentNullException
- Thrown when elements
is null
.ArgumentOutOfRangeException
- An object of this type must be constructed from an array with at least 6 elements
.public RotationVectorAngularVelocity(@Nonnull double[] elements, int startIndex)
RotationVectorAngularVelocity
coordinates from 6 consecutive elements in the provided array.elements
- The array of coordinate values.startIndex
- The index of the first element in the array to use.ArgumentNullException
- Thrown when the array of elements
is null
.ArgumentOutOfRangeException
- Thrown when an object of this type is constructed from an array with less than 6 elements
.@Nonnull public final Cartesian getRotationVector()
@Nonnull public final Cartesian getAngularVelocity()
public final double getX()
public final double getY()
public final double getZ()
public final double getOmegaX()
public final double getOmegaY()
public final double getOmegaZ()
@Nonnull public static UnitQuaternion rotationVectorToUnitQuaternion(@Nonnull Cartesian rotationVector)
rotationVector
- A rotation vector, which is the rotation angle times the rotation axis.@Nonnull public static Cartesian unitQuaternionToRotationVector(@Nonnull UnitQuaternion unitQuaternion)
unitQuaternion
- A representation of the attitude of a rigid body.UnitQuaternion
.@Nonnull public static Motion2<UnitQuaternion,Cartesian> toMotionUnitQuaternionCartesian(@Nonnull RotationVectorAngularVelocity rotationVectorAngularVelocity, int order)
rotationVectorAngularVelocity
- A parameter representing the rotation vector and body-fixed angular velocity of a rigid-body.order
- An order of 0 or less produces a motion with only the unit quaternion value initialized. An order of 1 or greater
produces a motion with both the unit quaternion and the angular velocity expressed in the inertial axes.@Nonnull public static Motion2<UnitQuaternion,Cartesian> toMotionUnitQuaternionCartesian(@Nonnull Motion1<RotationVectorAngularVelocity> motionRotationVectorAngularVelocity, int order)
motionRotationVectorAngularVelocity
- A motion representing the rotation vector and body-fixed angular velocity of a rigid-body.
The first derivatives of these parameters may also be included.order
- An order of 0 or less produces a motion with only the unit quaternion value initialized. An order of 1
produces a motion with both the unit quaternion and the angular velocity expressed in the inertial axes. An order of 2 or greater produces a motion
with the unit quaternion, inertial angular velocity, and inertial angular acceleration.@Nonnull public static RotationVectorAngularVelocity toRotationVectorAngularVelocity(@Nonnull Motion2<UnitQuaternion,Cartesian> motionUnitQuaternionCartesian)
motionUnitQuaternionCartesian
- A motion that represents the attitude and inertial angular velocity of a rigid body.@Nonnull public static Motion1<RotationVectorAngularVelocity> toMotionRotationVectorAngularVelocity(@Nonnull Motion2<UnitQuaternion,Cartesian> motionUnitQuaternionCartesian, int order)
motionUnitQuaternionCartesian
- A motion that represents the attitude and inertial angular velocity of a rigid body.order
- An order of 0 or less produces a motion with only the rotation vector and body-fixed angular velocity initialized. An order of 1 or greater
produces a motion that also includes the first derivative of the rotation vector and the body-fixed angular acceleration.public static DateMotionCollection2<UnitQuaternion,Cartesian> toDateMotionCollectionUnitQuaternionCartesian(DateMotionCollection1<RotationVectorAngularVelocity> inputCollection, int order)
DateMotionCollection
<RotationVectorAngularVelocity
> to a DateMotionCollection
<UnitQuaternion
, Cartesian
>.inputCollection
- A collection of rotation vectors, body-fixed angular velocities, and their derivatives at fixed dates.order
- An order of 0 or less produces a DateMotionCollection
<UnitQuaternion
, Cartesian
>
with only the unit quaternion value initialized. An order of 1 produces a collection with both the unit quaternion and the angular velocity expressed in the inertial axes.
An order of 2 or greater produces a collection with the unit quaternion,
inertial angular velocity, and inertial angular acceleration.public static DateMotionCollection1<RotationVectorAngularVelocity> toDateMotionCollectionRotationVectorAngularVelocity(DateMotionCollection2<UnitQuaternion,Cartesian> inputCollection, int order)
DateMotionCollection
<UnitQuaternion
, Cartesian
> to a DateMotionCollection
<RotationVectorAngularVelocity
>.inputCollection
- A collection of attitude quaternions, inertial angular velocities, and inertial angular accelerations at fixed dates.order
- An order of 0 or less produces a DateMotionCollection
<RotationVectorAngularVelocity
>
with only the rotation vector and body-fixed angular velocity initialized. An order of 1 or greater produces a collection that also includes
the first derivative of the rotation vector and the body-fixed angular acceleration.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 RotationVectorAngularVelocity other)
equalsType
in interface IEquatable<RotationVectorAngularVelocity>
other
- The instance to compare to this instance.true
if other
represents the same value as this instance; otherwise false
.public int hashCode()
hashCode
in class Object
Object.equals(java.lang.Object)
,
System.identityHashCode(java.lang.Object)
public static boolean equals(@Nonnull RotationVectorAngularVelocity left, @Nonnull RotationVectorAngularVelocity right)
RotationVectorAngularVelocity
objects.left
- The left hand side rotation vector and body-fixed angular velocity.right
- The right hand side rotation vector and body-fixed angular velocity.true
if the two parameters are equal, and false
if the
two parameters are unequal.public static boolean notEquals(@Nonnull RotationVectorAngularVelocity left, @Nonnull RotationVectorAngularVelocity right)
RotationVectorAngularVelocity
objects.left
- The left hand side rotation vector and body-fixed angular velocity.right
- The right hand side rotation vector and body-fixed angular velocity.true
if the two parameters are unequal, and false
if the
two parameters are equal.