public final class AxisAngle extends AbstractRotation<AxisAngle> implements javolution.xml.XMLSerializable
This class represents a rotation axis and rotation angle made up of Float64 elements. AxisAngles may be used to represents a relative orientation (attitude or rotation transformation) between two different reference frames; B wrt A or BA. It can be used to transform coordinates in reference frame A to reference frame B (A2B).
Reference: Wikipedia: Axis angle
Modified by: Joseph A. Huwaldt
Modifier and Type | Field and Description |
---|---|
static int |
THETA
The index to the angular component of this axis angle rotation representation.
|
static int |
X
The index to the vector X component of this axis angle rotation representation's axis.
|
static int |
Y
The index to the vector Y component of this axis angle rotation representation's axis.
|
static int |
Z
The index to the vector Z component of this axis angle rotation representation's axis.
|
Modifier and Type | Method and Description |
---|---|
AxisAngle |
copy()
Returns a copy of this rotation transform
allocated
by the calling thread (possibly on the stack). |
AxisAngle |
divide(Rotation<?> that)
Returns the division of this rotation transform with the specified rotation transform.
|
boolean |
equals(java.lang.Object obj)
Compares this AxisAngle against the specified object for strict
equality (same rotation type and same values).
|
Parameter<Angle> |
getAngle()
Return the rotation angle.
|
Vector3D<Dimensionless> |
getAxis()
Returns the rotation axis part of this axis/angle rotation transformation
as a unit vector.
|
int |
hashCode()
Returns the hash code for this rotation.
|
AxisAngle |
times(Rotation<?> that)
Returns the product of this rotation transform with the specified rotation transform.
|
DCMatrix |
toDCM()
Returns a direction cosine transformation matrix from this axis/angle rotation.
|
Quaternion |
toQuaternion()
Returns a quaternion representing this rotation transformation.
|
javolution.text.Text |
toText()
Returns the text representation of this rotation transform.
|
<Q extends Quantity> |
transform(Coordinate3D<Q> v)
Transforms a 3D vector from frame A to B using this axis/angle rotation.
|
AxisAngle |
transpose()
Returns the spatial inverse of this transformation: AB rather than BA.
|
static AxisAngle |
valueOf(Rotation<?> transform)
Returns a new
AxisAngle instance constructed from the specified rotation transform. |
static AxisAngle |
valueOf(Vector3D<?> axis,
Parameter<Angle> angle)
Returns a
AxisAngle instance containing the specified rotation axis and
rotation angle. |
getEulerTM, getPsiThetaTM, getPsiThetaTM, isApproxEqual, toString
public static final int X
public static final int Y
public static final int Z
public static final int THETA
public static AxisAngle valueOf(Vector3D<?> axis, Parameter<Angle> angle)
AxisAngle
instance containing the specified rotation axis and
rotation angle.axis
- The vector representing the rotation axis direction.angle
- The rotation angle about the rotation axis.public static AxisAngle valueOf(Rotation<?> transform)
AxisAngle
instance constructed from the specified rotation transform.transform
- The Rotation transform to convert to a new quaternion.public Vector3D<Dimensionless> getAxis()
public AxisAngle transpose()
public AxisAngle times(Rotation<?> that)
public AxisAngle divide(Rotation<?> that)
that
- the rotation transform divisor.this / that
public <Q extends Quantity> Vector3D<Q> transform(Coordinate3D<Q> v)
public DCMatrix toDCM()
toDCM
in interface Rotation<AxisAngle>
public Quaternion toQuaternion()
toQuaternion
in interface Rotation<AxisAngle>
public AxisAngle copy()
allocated
by the calling thread (possibly on the stack).public javolution.text.Text toText()
toText
in interface javolution.lang.Realtime
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- the object to compare with.true
if this rotation is identical to that
rotation; false
otherwise.public int hashCode()
hashCode
in class java.lang.Object