Enum Class CAxis

java.lang.Object
java.lang.Enum<CAxis>
com.io7m.jcoords.core.conversion.CAxis
All Implemented Interfaces:
Serializable, Comparable<CAxis>, Constable

public enum CAxis extends Enum<CAxis>
An axis.
  • Enum Constant Details

    • AXIS_POSITIVE_X

      public static final CAxis AXIS_POSITIVE_X
      The positive X axis.
    • AXIS_POSITIVE_Y

      public static final CAxis AXIS_POSITIVE_Y
      The positive Y axis.
    • AXIS_POSITIVE_Z

      public static final CAxis AXIS_POSITIVE_Z
      The positive Z axis.
    • AXIS_NEGATIVE_X

      public static final CAxis AXIS_NEGATIVE_X
      The negative X axis.
    • AXIS_NEGATIVE_Y

      public static final CAxis AXIS_NEGATIVE_Y
      The negative Y axis.
    • AXIS_NEGATIVE_Z

      public static final CAxis AXIS_NEGATIVE_Z
      The negative Z axis.
  • Method Details

    • values

      public static CAxis[] 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 CAxis 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
    • of

      public static CAxis of(String name) throws IllegalArgumentException
      Parse an axis.
      Parameters:
      name - The axis as "+x", "-x", "+y", "-y", "+z", or "-z"
      Returns:
      A parsed axis
      Throws:
      IllegalArgumentException - If the axis cannot be parsed
    • axis

      public int axis()
      Returns:
      The axis as 'x', 'y' or 'z'
    • axisSigned

      public String axisSigned()
      Returns:
      The axis as "+x", "-x", "+y", "-y", "+z", or "-z"
    • vector

      public com.io7m.jtensors.core.unparameterized.vectors.Vector3D vector()
      Returns:
      The vector for the axis