java.lang.Object
java.lang.Enum<Side>
xyz.jeremynoesen.pseudo3d.core.util.Side
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Side>, java.lang.constant.Constable

public enum Side
extends java.lang.Enum<Side>
Sides of the Box
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    java.lang.Enum.EnumDesc<E extends java.lang.Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant Description
    BACK  
    BOTTOM  
    FRONT  
    LEFT  
    RIGHT  
    TOP  
  • Method Summary

    Modifier and Type Method Description
    static Side getFromNormal​(Axis axis, float dir)
    Get a Side whose normal has specified direction on an Axis
    static Axis getNormalAxis​(Side side)
    Get Axis of normal for a Side
    static Vector getNormalVector​(Side side)
    Get the Vector normal to a side
    static Side getOpposite​(Side side)
    Get the Side opposite of the specified Side of a box
    static Side valueOf​(java.lang.String name)
    Returns the enum constant of this type with the specified name.
    static Side[] values()
    Returns an array containing the constants of this enum type, in the order they are declared.

    Methods inherited from class java.lang.Enum

    clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • LEFT

      public static final Side LEFT
    • BOTTOM

      public static final Side BOTTOM
    • TOP

      public static final Side TOP
    • BACK

      public static final Side BACK
    • FRONT

      public static final Side FRONT
  • Method Details

    • values

      public static Side[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static Side valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
      java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
      java.lang.NullPointerException - if the argument is null
    • getFromNormal

      public static Side getFromNormal​(Axis axis, float dir)
      Get a Side whose normal has specified direction on an Axis
      Parameters:
      axis - Axis of normal
      dir - Direction of normal
      Returns:
      Side based on normal direction and Axis
    • getOpposite

      public static Side getOpposite​(Side side)
      Get the Side opposite of the specified Side of a box
      Parameters:
      side - Side to get the opposite of
      Returns:
      Opposoite Side
    • getNormalVector

      public static Vector getNormalVector​(Side side)
      Get the Vector normal to a side
      Parameters:
      side - Side to get normal of
      Returns:
      Normal Vector
    • getNormalAxis

      public static Axis getNormalAxis​(Side side)
      Get Axis of normal for a Side
      Parameters:
      side - Side of object
      Returns:
      Axis of normal for the Side