Enum Class RotationAxis

java.lang.Object
java.lang.Enum<RotationAxis>
net.darkhax.botanypots.common.api.data.display.math.RotationAxis
All Implemented Interfaces:
Serializable, Comparable<RotationAxis>, Constable

public enum RotationAxis extends Enum<RotationAxis>
An enum containing information about each rotational axis.
  • Enum Constant Details

  • Method Details

    • values

      public static RotationAxis[] 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

      public static RotationAxis valueOf(String name)
      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 name
      NullPointerException - 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.