public class OrthonormalBasis extends Object
Constructor and Description |
---|
OrthonormalBasis(UnitCartesian direction)
Initializes an orthonormal bases with the input direction.
|
OrthonormalBasis(UnitCartesian principal,
UnitCartesian reference)
Initializes an orthonormal bases with the input direction and reference.
|
Modifier and Type | Method and Description |
---|---|
UnitCartesian |
getFirstAxis()
Gets the first axis.
|
UnitQuaternion |
getRotation()
Gets the rotation from the axes of the defining Cartesian vector(s) to the axes of the basis.
|
UnitCartesian |
getSecondAxis()
Gets the second axis.
|
UnitCartesian |
getThirdAxis()
Gets the third axis.
|
String |
toString()
Returns the
UnitCartesians that define this OrthonormalBasis in the format
"FirstAxis (get ) ; SecondAxis (get ) ; ThirdAxis (get )". |
public OrthonormalBasis(@Nonnull UnitCartesian direction)
The most orthogonal axis will be used as the reference direction.
direction
- The direction.public OrthonormalBasis(@Nonnull UnitCartesian principal, @Nonnull UnitCartesian reference)
The first axis coincides with the principal direction. The seconds axis is the unit vector in the direction defined by crossing the reference direction with the principal direction. The third axis is then the result of crossing the first and second axes.
principal
- The principal direction.reference
- The reference direction.@Nonnull public final UnitCartesian getFirstAxis()
@Nonnull public final UnitCartesian getSecondAxis()
@Nonnull public final UnitCartesian getThirdAxis()
public String toString()
UnitCartesians
that define this OrthonormalBasis
in the format
"FirstAxis
(get
) ; SecondAxis
(get
) ; ThirdAxis
(get
)".@Nonnull public final UnitQuaternion getRotation()