public class Orientation2D extends Orientation
Constructor and Description |
---|
Orientation2D() |
Orientation2D(double angleRadians) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
canEqual(Object other) |
protected RotationMatrix |
deriveRotationMatrix()
Derives a
RotationMatrix that can be applied to rotate an entity
anti-clockwise to the current orientation. |
boolean |
equals(Object o) |
double |
getAngleDegrees()
The angle of the rotation in the 2D plane anti-clockwise, in degrees.
|
int |
hashCode() |
Orientation2D |
negative()
Derives a new
Orientation in the opposite (negative) direction to the current
instance. |
int |
numberDimensions()
The dimensionality of space the orientation is valid for.
|
String |
toString() |
getRotationMatrix
public Orientation2D(double angleRadians)
public Orientation2D()
public double getAngleDegrees()
public Orientation2D negative()
Orientation
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.
negative
in class Orientation
Orientation
in the negative direction.protected RotationMatrix deriveRotationMatrix()
Orientation
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.
deriveRotationMatrix
in class Orientation
public int numberDimensions()
Orientation
numberDimensions
in class Orientation
public boolean equals(Object o)
equals
in class Orientation
protected boolean canEqual(Object other)
public int hashCode()
hashCode
in class Orientation
Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.