Contents
Enum Class Axis
- All Implemented Interfaces:
Serializable, Comparable<Axis>, Constable
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionvoidflip(org.joml.Vector3d vector) Flips the x, y, or z component of the given vector that corresponds to this Axis.voidflip(org.joml.Vector3i vector) Flips the x, y, or z component of the given vector that corresponds to this Axis.voidflipRotation(Rotation3f rotation) Flips the x, y, or z component of the rotation vector that corresponds to this Axis.org.joml.Vector3icvoidrotate(org.joml.Vector3d vector) Rotates the given vector 90 degrees around this axis.voidrotate(org.joml.Vector3d vector, int angle) Rotates the given vector around this axis by the specified angle in degrees.voidrotate(org.joml.Vector3i vector) Rotates the given vector 90 degrees around this axis.voidrotate(org.joml.Vector3i vector, int angle) Rotates the given vector around this axis by the specified angle in degrees.static AxisReturns the enum constant of this class with the specified name.static Axis[]values()Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
X
The X axis. -
Y
The Y axis. -
Z
The Z axis.
-
-
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
-
getDirection
@Nonnull public org.joml.Vector3ic getDirection()- Returns:
- the direction vector representing this axis.
-
rotate
public void rotate(@Nonnull org.joml.Vector3i vector, int angle) Rotates the given vector around this axis by the specified angle in degrees.- Parameters:
vector- The vector to rotate.angle- The angle in degrees to rotate the vector.
-
rotate
public void rotate(@Nonnull org.joml.Vector3d vector, int angle) Rotates the given vector around this axis by the specified angle in degrees.- Parameters:
vector- The vector to rotate.angle- The angle in degrees to rotate the vector.
-
rotate
public void rotate(@Nonnull org.joml.Vector3i vector) Rotates the given vector 90 degrees around this axis.- Parameters:
vector- The vector to rotate.
-
rotate
public void rotate(@Nonnull org.joml.Vector3d vector) Rotates the given vector 90 degrees around this axis.- Parameters:
vector- The vector to rotate.
-
flip
public void flip(@Nonnull org.joml.Vector3i vector) Flips the x, y, or z component of the given vector that corresponds to this Axis. This has the effect of mirroring- Parameters:
vector- The vector to flip.
-
flip
public void flip(@Nonnull org.joml.Vector3d vector) Flips the x, y, or z component of the given vector that corresponds to this Axis. This has the effect of mirroring- Parameters:
vector- The vector to flip.
-
flipRotation
Flips the x, y, or z component of the rotation vector that corresponds to this Axis. This has the effect of mirroring the rotation across the plane made by the remaining two axes.- Parameters:
rotation- The rotation vector to flip whose x-value represents pitch and y-value represents yaw (in radians).
-