Package com.jme3.scene
Enum Class Mesh.Mode
- All Implemented Interfaces:
- Serializable,- Comparable<Mesh.Mode>,- Constable
- Enclosing class:
- Mesh
The mode of the Mesh specifies both the type of primitive represented
 by the mesh and how the data should be interpreted.
- 
Nested Class SummaryNested classes/interfaces inherited from class java.lang.EnumEnum.EnumDesc<E extends Enum<E>>
- 
Enum Constant SummaryEnum ConstantsEnum ConstantDescriptionA combination of various triangle modes.Identical toLineStripexcept that at the end the last vertex is connected with the first to form a line.A primitive is a line segment.A primitive is a line segment.Used for Tessellation only.A primitive is a single point in space.Similar toTriangles, the first 3 vertices specify a triangle, each 2 subsequent vertices are combined with the very first vertex to make a triangle.A primitive is a triangle.Similar toTriangles, the first 3 vertices specify a triangle, while subsequent vertices are combined with the previous two to form a triangle.
- 
Method SummaryModifier and TypeMethodDescriptionbooleanReturns 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.ModeReturns the enum constant of this class with the specified name.static Mesh.Mode[]values()Returns an array containing the constants of this enum class, in the order they are declared.
- 
Enum Constant Details- 
PointsA primitive is a single point in space. The size ofpointsare determined via the vertex shader'sgl_PointSizeoutput.
- 
LinesA primitive is a line segment. Every two vertices specify a single line.Material.getAdditionalRenderState()andRenderState.setLineWidth(float)can be used to set the width of the lines.
- 
LineStripA 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.Material.getAdditionalRenderState()andRenderState.setLineWidth(float)can be used to set the width of the lines.
- 
LineLoopIdentical toLineStripexcept that at the end the last vertex is connected with the first to form a line.Material.getAdditionalRenderState()andRenderState.setLineWidth(float)can be used to set the width of the lines.
- 
TrianglesA primitive is a triangle. Each 3 vertices specify a single triangle.
- 
TriangleStripSimilar toTriangles, the first 3 vertices specify a triangle, while subsequent vertices are combined with the previous two to form a triangle.
- 
TriangleFanSimilar toTriangles, the first 3 vertices specify a triangle, each 2 subsequent vertices are combined with the very first vertex to make a triangle.
- 
HybridA combination of various triangle modes. It is best to avoid using this mode as it may not be supported by all renderers. Themode start pointsandelement lengthsmust be specified for this mode.
- 
PatchUsed for Tessellation only. Requires to set the number of vertices for each patch (default is 3 for triangle tessellation)
 
- 
- 
Method Details- 
valuesReturns 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
 
- 
valueOfReturns 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 name
- NullPointerException- if the argument is null
 
- 
isListModepublic 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 typesPoints,LinesandTriangles.- Returns:
- true if the mode is a list type mode
 
 
-