Package com.io7m.smfj.core
Enum SMFFaceWindingOrder
- java.lang.Object
-
- java.lang.Enum<SMFFaceWindingOrder>
-
- com.io7m.smfj.core.SMFFaceWindingOrder
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<SMFFaceWindingOrder>
public enum SMFFaceWindingOrder extends java.lang.Enum<SMFFaceWindingOrder>
The face winding order for triangles.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description FACE_WINDING_ORDER_CLOCKWISE
The vertices of triangles are specified in clockwise winding order.FACE_WINDING_ORDER_COUNTER_CLOCKWISE
The vertices of triangles are specified in counter-clockwise winding order.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SMFFaceWindingOrder
fromName(java.lang.String name)
int
index()
java.lang.String
toName()
static SMFFaceWindingOrder
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static SMFFaceWindingOrder[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
FACE_WINDING_ORDER_CLOCKWISE
public static final SMFFaceWindingOrder FACE_WINDING_ORDER_CLOCKWISE
The vertices of triangles are specified in clockwise winding order.
-
FACE_WINDING_ORDER_COUNTER_CLOCKWISE
public static final SMFFaceWindingOrder FACE_WINDING_ORDER_COUNTER_CLOCKWISE
The vertices of triangles are specified in counter-clockwise winding order.
-
-
Method Detail
-
values
public static SMFFaceWindingOrder[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (SMFFaceWindingOrder c : SMFFaceWindingOrder.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static SMFFaceWindingOrder 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 namejava.lang.NullPointerException
- if the argument is null
-
fromName
public static SMFFaceWindingOrder fromName(java.lang.String name) throws java.lang.IllegalArgumentException
- Parameters:
name
- An order name such as "clockwise" or "counter-clockwise"- Returns:
- A face winding order for the given name
- Throws:
java.lang.IllegalArgumentException
- On unrecognized names
-
index
public int index()
- Returns:
- The integer index of the value
-
toName
public java.lang.String toName()
- Returns:
- The face winding order as a humanly readable name such as "counter-clockwise"
-
-