Package snap.gfx3d
Enum Class Side3D
- All Implemented Interfaces:
Serializable
,Comparable<Side3D>
,Constable
An enum to represent a side of rectanglular area: Left, right, top, bottom.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
This class describes the corners of a standard cube.static enum
This class describes the edges of the standard cube.Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetCornerForPos
(Pos aPos) Returns the Corner for given Pos.Returns the corners.getEdgeForPos
(Pos aPos) Returns the Edge for given Pos.getEdges()
Returns the edges.Returns the side normal for a given side.getPosForCorner
(Side3D.Corner aCorner) Returns the Corner for given Pos.getPosForEdge
(Side3D.Edge anEdge) Returns the Edge for given Pos.boolean
Returns whether side is FRONT or BACK.boolean
Returns whether side is LEFT or RIGHT.boolean
Returns whether side is TOP or BOTTOM.static Side3D
Returns the enum constant of this class with the specified name.static Side3D[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
FRONT
-
BACK
-
LEFT
-
RIGHT
-
TOP
-
BOTTOM
-
-
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
-
isFrontOrBack
public boolean isFrontOrBack()Returns whether side is FRONT or BACK. -
isLeftOrRight
public boolean isLeftOrRight()Returns whether side is LEFT or RIGHT. -
isTopOrBottom
public boolean isTopOrBottom()Returns whether side is TOP or BOTTOM. -
getNormalInward
Returns the side normal for a given side. -
getCorners
Returns the corners. -
getCornerForPos
Returns the Corner for given Pos. -
getPosForCorner
Returns the Corner for given Pos. -
getEdges
Returns the edges. -
getEdgeForPos
Returns the Edge for given Pos. -
getPosForEdge
Returns the Edge for given Pos.
-