Enum Side
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
-
Method Summary
Modifier and Type Method Description static Side
getFromNormal(Axis axis, float dir)
Get a Side whose normal has specified direction on an Axisstatic Axis
getNormalAxis(Side side)
Get Axis of normal for a Sidestatic Vector
getNormalVector(Side side)
Get the Vector normal to a sidestatic Side
getOpposite(Side side)
Get the Side opposite of the specified Side of a boxstatic 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
-
RIGHT
-
BOTTOM
-
TOP
-
BACK
-
FRONT
-
-
Method Details
-
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
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 namejava.lang.NullPointerException
- if the argument is null
-
getFromNormal
Get a Side whose normal has specified direction on an Axis- Parameters:
axis
- Axis of normaldir
- Direction of normal- Returns:
- Side based on normal direction and Axis
-
getOpposite
Get the Side opposite of the specified Side of a box- Parameters:
side
- Side to get the opposite of- Returns:
- Opposoite Side
-
getNormalVector
Get the Vector normal to a side- Parameters:
side
- Side to get normal of- Returns:
- Normal Vector
-
getNormalAxis
Get Axis of normal for a Side- Parameters:
side
- Side of object- Returns:
- Axis of normal for the Side
-