com.jme3.scene
Enum Mesh.Mode

java.lang.Object
  extended by java.lang.Enum<Mesh.Mode>
      extended by com.jme3.scene.Mesh.Mode
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Mesh.Mode>
Enclosing class:
Mesh

public static enum Mesh.Mode
extends java.lang.Enum<Mesh.Mode>

The mode of the Mesh specifies both the type of primitive represented by the mesh and how the data should be interpreted.


Enum Constant Summary
Hybrid
          A combination of various triangle modes.
LineLoop
          Identical to LineStrip except that at the end the last vertex is connected with the first to form a line.
Lines
          A primitive is a line segment.
LineStrip
          A primitive is a line segment.
Points
          A primitive is a single point in space.
TriangleFan
          Similar to Triangles, the first 3 vertices specify a triangle, each 2 subsequent vertices are combined with the very first vertex to make a triangle.
Triangles
          A primitive is a triangle.
TriangleStrip
          Similar to Triangles, the first 3 vertices specify a triangle, while subsequent vertices are combined with the previous two to form a triangle.
 
Method Summary
 boolean isListMode()
          Returns true if the specified mode is a list mode (meaning ,it specifies the indices as a linear list and not some special format).
static Mesh.Mode valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static Mesh.Mode[] 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 Mesh.Mode Points
A primitive is a single point in space. The size of the points can be specified with Mesh.setPointSize(float).


Lines

public static final Mesh.Mode Lines
A primitive is a line segment. Every two vertices specify a single line. Mesh.setLineWidth(float) can be used to set the width of the lines.


LineStrip

public static final Mesh.Mode LineStrip
A primitive is a line segment. The first two vertices specify a single line, while subsequent vertices are combined with the previous vertex to make a line. Mesh.setLineWidth(float) can be used to set the width of the lines.


LineLoop

public static final Mesh.Mode LineLoop
Identical to LineStrip except that at the end the last vertex is connected with the first to form a line. Mesh.setLineWidth(float) can be used to set the width of the lines.


Triangles

public static final Mesh.Mode Triangles
A primitive is a triangle. Each 3 vertices specify a single triangle.


TriangleStrip

public static final Mesh.Mode TriangleStrip
Similar to Triangles, the first 3 vertices specify a triangle, while subsequent vertices are combined with the previous two to form a triangle.


TriangleFan

public static final Mesh.Mode TriangleFan
Similar to Triangles, the first 3 vertices specify a triangle, each 2 subsequent vertices are combined with the very first vertex to make a triangle.


Hybrid

public static final Mesh.Mode Hybrid
A combination of various triangle modes. It is best to avoid using this mode as it may not be supported by all renderers. The mode start points and element lengths must be specified for this mode.

Method Detail

values

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

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

valueOf

public static Mesh.Mode 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

isListMode

public boolean isListMode()
Returns true if the specified mode is a list mode (meaning ,it specifies the indices as a linear list and not some special format). Will return true for the types Points, Lines and Triangles.

Returns:
true if the mode is a list type mode