Package de.xima.fc.common.geometry
Enum EViewDirection2D
- java.lang.Object
-
- java.lang.Enum<EViewDirection2D>
-
- de.xima.fc.common.geometry.EViewDirection2D
-
- All Implemented Interfaces:
Serializable
,Comparable<EViewDirection2D>
public enum EViewDirection2D extends Enum<EViewDirection2D>
Enumeration of view directions in 2D space. A view direction is always relative to a reference direction. For example, when an observer looksEAST
, the forward direction isEAST
, the backward direction isWEST
, the left direction isNORTH
, and the right direction isSOUTH
.- Since:
- 8.4.0
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract ECardinalDirection2D
resolve(ECardinalDirection2D direction)
static EViewDirection2D
valueOf(String name)
Returns the enum constant of this type with the specified name.static EViewDirection2D[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
FORWARD
public static final EViewDirection2D FORWARD
The forward direction, i.e. the direction the observer is looking at.
-
BACKWARD
public static final EViewDirection2D BACKWARD
The backward direction, i.e. the direction opposite to the direction the observer is looking at.
-
LEFT
public static final EViewDirection2D LEFT
The left direction, i.e. the direction on the observer's right hand side.
-
RIGHT
public static final EViewDirection2D RIGHT
The right direction, i.e. the direction on the observer's left hand side.
-
-
Method Detail
-
values
public static EViewDirection2D[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (EViewDirection2D c : EViewDirection2D.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static EViewDirection2D valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
resolve
public abstract ECardinalDirection2D resolve(ECardinalDirection2D direction)
-
-