org.jagatoo.opengl.enums
Enum GeometryArrayType

java.lang.Object
  extended by java.lang.Enum<GeometryArrayType>
      extended by org.jagatoo.opengl.enums.GeometryArrayType
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<GeometryArrayType>

public enum GeometryArrayType
extends java.lang.Enum<GeometryArrayType>

This enum abstracts all the available basic types of geometry array, that are supported by OpenGL. Each member provides the OpenGL constant for the appropriate type.


Enum Constant Summary
LINE_STRIP
          A strip of lines.
LINES
          A simple array of lines (two vertices per line).
POINTS
          A simple array of points (one vertex per point)..
QUAD_STRIP
          A strip of quads.
QUADS
          A simple array of quads (four vertices per quad).
TRIANGLE_FAN
          A fan of triangles.
TRIANGLE_STRIP
          A strip of triangles.
TRIANGLES
          A simple array of triangles (three vertices per triangle).
 
Method Summary
 int getFaceSize()
           
 boolean isStrip()
           
 int toOpenGL()
           
static GeometryArrayType valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static GeometryArrayType[] 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, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

POINTS

public static final GeometryArrayType POINTS
A simple array of points (one vertex per point)..


LINES

public static final GeometryArrayType LINES
A simple array of lines (two vertices per line).


LINE_STRIP

public static final GeometryArrayType LINE_STRIP
A strip of lines. first two vertices build the first line. (i-1)-th and (i)-th vertex build the following lines.


TRIANGLES

public static final GeometryArrayType TRIANGLES
A simple array of triangles (three vertices per triangle).


TRIANGLE_STRIP

public static final GeometryArrayType TRIANGLE_STRIP
A strip of triangles. first three vertices build the first triangle. (i-2)-th, (i-1)-th and (i)-th vertex build the following triangles.


TRIANGLE_FAN

public static final GeometryArrayType TRIANGLE_FAN
A fan of triangles. The first vertex is pert of each triangle. The following triangles behave like a strip.


QUADS

public static final GeometryArrayType QUADS
A simple array of quads (four vertices per quad).


QUAD_STRIP

public static final GeometryArrayType QUAD_STRIP
A strip of quads. first four vertices build the first quad. (i-3)-th, (i-2)-th, (i-1)-th and (i)-th vertex build the following quads.

Method Detail

values

public static GeometryArrayType[] 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 (GeometryArrayType c : GeometryArrayType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static GeometryArrayType 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

getFaceSize

public final int getFaceSize()
Returns:
the number of vertices per face for this type.

isStrip

public final boolean isStrip()

toOpenGL

public final int toOpenGL()