Package pi.graphics.geom
Enum Class Direction
- All Implemented Interfaces:
Serializable,Comparable<Direction>,Constable
Repräsentation einer Richtung.
- Author:
- Michael Andonie, Niklas Keller
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionRepräsentation einer Richtung, die nach unten zeigt.Repräsentation einer Richtung, die nach unten links zeigt.Repräsentation einer Richtung, die nach oben rechts zeigt.Repräsentation einer Richtung, die nach links zeigt.Repräsentation einer Richtung, die nirgendwo hinzeigt.Repräsentation einer Richtung, die nach rechts zeigt.Repräsentation einer Richtung, die nach oben zeigt.Repräsentation einer Richtung, die nach oben links zeigt.Repräsentation einer Richtung, die nach oben rechts zeigt. -
Method Summary
Modifier and TypeMethodDescriptiontoVector()Berechnet einen einfachen Vektor (maximale Auslenkung bei jeder Achse 1 – positiv wie negativ).static DirectionReturns the enum constant of this class with the specified name.static Direction[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
UP
Repräsentation einer Richtung, die nach oben zeigt. -
UP_RIGHT
Repräsentation einer Richtung, die nach oben rechts zeigt. -
RIGHT
Repräsentation einer Richtung, die nach rechts zeigt. -
DOWN_RIGHT
Repräsentation einer Richtung, die nach oben rechts zeigt. -
DOWN
Repräsentation einer Richtung, die nach unten zeigt. -
DOWN_LEFT
Repräsentation einer Richtung, die nach unten links zeigt. -
LEFT
Repräsentation einer Richtung, die nach links zeigt. -
UP_LEFT
Repräsentation einer Richtung, die nach oben links zeigt. -
NONE
Repräsentation einer Richtung, die nirgendwo hinzeigt.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException- if the argument is null
-
toVector
Berechnet einen einfachen Vektor (maximale Auslenkung bei jeder Achse 1 – positiv wie negativ).- Returns:
- Vector, der mit einer einfachen Auslenkung (d.h. für
xundyje ein Wertebereich von {-1, 0, 1}) die entsprechende Bewegung macht.
-