Class OrientationAxisAngle
Object
Orientation
OrientationAxisAngle
- All Implemented Interfaces:
Serializable
An orientation in axis-angle representation.
- Author:
- Owen Feehan
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionOrientationAxisAngle
(Vector3d axis, double angle) Creates a newOrientationAxisAngle
instance. -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
protected RotationMatrix
Derives aRotationMatrix
that can be applied to rotate an entity anti-clockwise to the current orientation.boolean
double
getAngle()
Angle part of axis-angle orientation (anti-clock in radians).getAxis()
Axis part of axis-angle orientation (should be normalized).int
hashCode()
negative()
Derives a newOrientation
in the opposite (negative) direction to the current instance.int
The dimensionality of space the orientation is valid for.toString()
Methods inherited from class org.anchoranalysis.spatial.orientation.Orientation
getRotationMatrix
-
Constructor Details
-
OrientationAxisAngle
Creates a newOrientationAxisAngle
instance.- Parameters:
axis
- Axis part of axis-angle orientation (should be normalized). Once this is passed here, it is consumed, and must not be changed elsewhere.angle
- Angle part of axis-angle orientation (anti-clock in radians).
-
-
Method Details
-
toString
-
deriveRotationMatrix
Description copied from class:Orientation
Derives aRotationMatrix
that can be applied to rotate an entity anti-clockwise to the current orientation.It presumes the existing entity has a neutral orientation along the x-axis.
- Specified by:
deriveRotationMatrix
in classOrientation
- Returns:
- the rotation-matrix.
-
negative
Description copied from class:Orientation
Derives a newOrientation
in the opposite (negative) direction to the current instance.A unit step from the origin in the current orientation direction, summed with a unit step in the negative direction, should end in the origin.
- Specified by:
negative
in classOrientation
- Returns:
- the new
Orientation
in the negative direction.
-
numberDimensions
public int numberDimensions()Description copied from class:Orientation
The dimensionality of space the orientation is valid for.- Specified by:
numberDimensions
in classOrientation
- Returns:
- 2 or 3.
-
getAxis
Axis part of axis-angle orientation (should be normalized). Once this is passed here, it is consumed, and must not be changed elsewhere. -
getAngle
public double getAngle()Angle part of axis-angle orientation (anti-clock in radians). -
equals
- Specified by:
equals
in classOrientation
-
canEqual
-
hashCode
public int hashCode()- Specified by:
hashCode
in classOrientation
-