Class OrientationRotationMatrix
Object
org.anchoranalysis.spatial.orientation.Orientation
org.anchoranalysis.spatial.orientation.OrientationRotationMatrix
- All Implemented Interfaces:
Serializable
public class OrientationRotationMatrix extends Orientation
Orients an object by rotating anti-clockwise with an explicit
RotationMatrix.
Before rotation, the entity is presumed to be aligned with the x-axis.
- Author:
- Owen Feehan
- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description OrientationRotationMatrix()OrientationRotationMatrix(RotationMatrix rotationMatrix) -
Method Summary
Modifier and Type Method Description protected booleancanEqual(Object other)protected RotationMatrixderiveRotationMatrix()Derives aRotationMatrixthat can be applied to rotate an entity anti-clockwise to the current orientation.booleanequals(Object o)RotationMatrixgetRotationMatrix()The rotation-matrix.inthashCode()Orientationnegative()Derives a newOrientationin the opposite (negative) direction to the current instance.intnumberDimensions()The dimensionality of space the orientation is valid for.
-
Constructor Details
-
OrientationRotationMatrix
public OrientationRotationMatrix() -
OrientationRotationMatrix
-
-
Method Details
-
deriveRotationMatrix
Description copied from class:OrientationDerives aRotationMatrixthat 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:
deriveRotationMatrixin classOrientation- Returns:
- the rotation-matrix.
-
negative
Description copied from class:OrientationDerives a newOrientationin 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:
negativein classOrientation- Returns:
- the new
Orientationin the negative direction.
-
numberDimensions
public int numberDimensions()Description copied from class:OrientationThe dimensionality of space the orientation is valid for.- Specified by:
numberDimensionsin classOrientation- Returns:
- 2 or 3.
-
equals
- Specified by:
equalsin classOrientation
-
canEqual
-
hashCode
public int hashCode()- Specified by:
hashCodein classOrientation
-
getRotationMatrix
The rotation-matrix. Once used here, it must be treated as immutable, and its state may not be changed elsewhere.- Overrides:
getRotationMatrixin classOrientation- Returns:
- the rotation-matrix.
-