Enum Class RotationAxis
- All Implemented Interfaces:
Serializable,Comparable<RotationAxis>,Constable
An enum containing information about each rotational axis.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionorg.joml.Vector3fgetOffset(int index) Gets the offset required to move back to the original position after a rotation has been applied.org.joml.QuaternionfgetRotation(int index) Gets the rotation quaternions for the specified degrees.static RotationAxisReturns the enum constant of this class with the specified name.static RotationAxis[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
X
-
Y
-
Z
-
-
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
-
getRotation
public org.joml.Quaternionf getRotation(int index) Gets the rotation quaternions for the specified degrees.- Parameters:
index- The degrees index. Must be 0-3. Represents 0, 90, 180, and 270.- Returns:
- The rotation quaternion for the specified degrees.
-
getOffset
public org.joml.Vector3f getOffset(int index) Gets the offset required to move back to the original position after a rotation has been applied.- Parameters:
index- The degrees index. Must be 0-3. Represents 0, 90, 180, and 270.- Returns:
- The offset to recenter after a rotation.
-