public abstract class Orientation extends Object implements Serializable
It presumes the existing entity has a neutral orientation along the x-axis.
All implementations must be immutable classes, whose state cannot be changed.
As an exception, we have internal state to memoize calls to deriveRotationMatrix()
.
Constructor and Description |
---|
Orientation() |
Modifier and Type | Method and Description |
---|---|
protected abstract RotationMatrix |
deriveRotationMatrix()
Derives a
RotationMatrix that can be applied to rotate an entity
anti-clockwise to the current orientation. |
abstract boolean |
equals(Object other) |
RotationMatrix |
getRotationMatrix()
Derives a
RotationMatrix that can be applied to rotate an entity
anti-clockwise to the current orientation. |
abstract int |
hashCode() |
abstract Orientation |
negative()
Derives a new
Orientation in the opposite (negative) direction to the current
instance. |
abstract int |
numberDimensions()
The dimensionality of space the orientation is valid for.
|
public RotationMatrix getRotationMatrix()
RotationMatrix
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.
This computation is memoized, upon the first call to this method.
protected abstract RotationMatrix deriveRotationMatrix()
RotationMatrix
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.
public abstract int numberDimensions()
public abstract Orientation negative()
Orientation
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.
Orientation
in the negative direction.Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.