public final class KinematicTransformation extends Object implements IEquatable<KinematicTransformation>, ImmutableValueType
Constructor and Description |
---|
KinematicTransformation()
Initializes a new instance.
|
KinematicTransformation(Cartesian translation,
Cartesian translationalVelocity,
Cartesian translationalAcceleration,
Motion2<UnitQuaternion,Cartesian> rotationalTransformation)
Initializes a new instance with the specified translational parameters and
RotationalMotion (get ). |
KinematicTransformation(Cartesian translation,
Cartesian translationalVelocity,
Cartesian translationalAcceleration,
UnitQuaternion rotation,
Cartesian rotationalVelocity,
Cartesian rotationalAcceleration)
Initializes a new instance with the specified translational and rotational parameters.
|
KinematicTransformation(Motion1<Cartesian> translationalMotion,
Motion2<UnitQuaternion,Cartesian> rotationalMotion)
Initializes a new instance from the specified translational and rotational motion.
|
Modifier and Type | Method and Description |
---|---|
KinematicTransformation |
compose(KinematicTransformation other)
Forms a new
KinematicTransformation as the composition of this transformation and the provided transformation. |
KinematicTransformation |
compose(KinematicTransformation other,
int order)
Forms a new
KinematicTransformation as the composition of this transformation and the provided transformation. |
static boolean |
equals(KinematicTransformation left,
KinematicTransformation right)
Returns
true if the two instances are exactly equal. |
boolean |
equals(Object obj)
Indicates whether another object is exactly equal to this instance.
|
boolean |
equalsType(KinematicTransformation other)
Indicates whether another instance of this type is exactly equal to this instance.
|
UnitQuaternion |
getRotation()
Gets the relative rotation between the reference frames.
|
Cartesian |
getRotationalAcceleration()
Gets the rotational acceleration of the second reference frame relative to and expressed in
the first reference frame.
|
Motion2<UnitQuaternion,Cartesian> |
getRotationalMotion()
Gets the rotational portion of this transformation.
|
int |
getRotationalOrder()
Gets the number of rotational motion derivatives described by this transformation.
|
Cartesian |
getRotationalVelocity()
Gets the rotational velocity of the second reference frame relative to and expressed in
the first reference frame.
|
Cartesian |
getTranslation()
Gets the relative position vector between the reference frames.
|
Cartesian |
getTranslationalAcceleration()
Gets the relative acceleration vector between the reference frames.
|
Motion1<Cartesian> |
getTranslationalMotion()
Gets the translational portion of this transformation.
|
int |
getTranslationalOrder()
Gets the number of translational motion derivatives described by this transformation.
|
Cartesian |
getTranslationalVelocity()
Gets the relative velocity vector between the reference frames.
|
int |
hashCode()
Returns a hash code for this instance, which is suitable for use in hashing algorithms and data structures like a hash table.
|
KinematicTransformation |
invert()
Forms the inverse kinematic transformation.
|
KinematicTransformation |
invert(int order)
Forms the inverse kinematic transformation.
|
static boolean |
notEquals(KinematicTransformation left,
KinematicTransformation right)
Returns
true if the two instances are not exactly equal. |
Cartesian |
transform(Cartesian position)
Transforms the position observed in the A frame to the B frame.
|
Motion1<Cartesian> |
transform(Motion1<Cartesian> motion)
Transforms the motion observed in the A frame to the B frame.
|
Motion1<Cartesian> |
transform(Motion1<Cartesian> motion,
int order)
Transforms the motion observed in the A frame to the B frame.
|
public KinematicTransformation()
public KinematicTransformation(@Nonnull Cartesian translation, @Nonnull Cartesian translationalVelocity, @Nonnull Cartesian translationalAcceleration, @Nonnull UnitQuaternion rotation, @Nonnull Cartesian rotationalVelocity, @Nonnull Cartesian rotationalAcceleration)
translation
- The translation.translationalVelocity
- The translational velocity.translationalAcceleration
- The translational acceleration.rotation
- The rotation.rotationalVelocity
- The rotational velocity.rotationalAcceleration
- The rotational acceleration.public KinematicTransformation(@Nonnull Cartesian translation, @Nonnull Cartesian translationalVelocity, @Nonnull Cartesian translationalAcceleration, @Nonnull Motion2<UnitQuaternion,Cartesian> rotationalTransformation)
RotationalMotion
(get
).translation
- The translation.translationalVelocity
- The translational velocity.translationalAcceleration
- The translational acceleration.rotationalTransformation
- The rotational transformation.public KinematicTransformation(@Nonnull Motion1<Cartesian> translationalMotion, @Nonnull Motion2<UnitQuaternion,Cartesian> rotationalMotion)
translationalMotion
- The translational portion of the transformation.rotationalMotion
- The rotational portion of the transformation.@Nonnull public final Motion1<Cartesian> getTranslationalMotion()
@Nonnull public final Motion2<UnitQuaternion,Cartesian> getRotationalMotion()
public final int getTranslationalOrder()
public final int getRotationalOrder()
@Nonnull public final Cartesian getTranslation()
@Nonnull public final Cartesian getTranslationalVelocity()
IllegalStateException
- Thrown when this transformation does not include translational velocity information.@Nonnull public final Cartesian getTranslationalAcceleration()
IllegalStateException
- Thrown when this transformation does not include translational acceleration information.@Nonnull public final UnitQuaternion getRotation()
@Nonnull public final Cartesian getRotationalVelocity()
IllegalStateException
is thrown.IllegalStateException
- Thrown when the transformation does not have rotational velocity information.@Nonnull public final Cartesian getRotationalAcceleration()
IllegalStateException
is thrown.IllegalStateException
- Thrown when the transformation does not include rotational acceleration information.@Nonnull public final KinematicTransformation invert()
@Nonnull public final KinematicTransformation invert(int order)
order
- The order of highest required derivative. To retrieve just the position, pass 0 for this value. To retrieve the velocity as well, pass 1. etc.@Nonnull public final Motion1<Cartesian> transform(@Nonnull Motion1<Cartesian> motion)
motion
- The motion to transform.@Nonnull public final Motion1<Cartesian> transform(@Nonnull Motion1<Cartesian> motion, int order)
motion
- The motion to transform.order
- The order of highest required derivative. To retrieve just the position, pass 0 for this value. To retrieve the velocity as well, pass 1. etc.@Nonnull public final Cartesian transform(@Nonnull Cartesian position)
position
- The position to transform.@Nonnull public final KinematicTransformation compose(@Nonnull KinematicTransformation other)
KinematicTransformation
as the composition of this transformation and the provided transformation.
If this transformation represents the transformation between reference frame "B" and reference frame "C"
and the provided transformation represents the transformation between reference frame "A" and reference frame "B",
the result represents the transformation between reference frame "A" and reference frame "C".other
- The transformation between reference frame "A" and reference frame "B".@Nonnull public final KinematicTransformation compose(@Nonnull KinematicTransformation other, int order)
KinematicTransformation
as the composition of this transformation and the provided transformation.
If this transformation represents the transformation between reference frame "B" and reference frame "C"
and the provided transformation represents the transformation between reference frame "A" and reference frame "B",
the result represents the transformation between reference frame "A" and reference frame "C".other
- The transformation between reference frame "A" and reference frame "B".order
- The order of highest required derivative. To retrieve just the position, pass 0 for this value. To retrieve the velocity as well, pass 1. etc.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 KinematicTransformation other)
equalsType
in interface IEquatable<KinematicTransformation>
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 KinematicTransformation left, @Nonnull KinematicTransformation 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 KinematicTransformation left, @Nonnull KinematicTransformation 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
.