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 Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionA combination of various triangle modes.Identical toLineStrip
except 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 Summary
Modifier and TypeMethodDescriptionboolean
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
Returns 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
-
Points
A primitive is a single point in space. The size ofpoints
are determined via the vertex shader'sgl_PointSize
output. -
Lines
A 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. -
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.Material.getAdditionalRenderState()
andRenderState.setLineWidth(float)
can be used to set the width of the lines. -
LineLoop
Identical toLineStrip
except 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. -
Triangles
A primitive is a triangle. Each 3 vertices specify a single triangle. -
TriangleStrip
Similar toTriangles
, the first 3 vertices specify a triangle, while subsequent vertices are combined with the previous two to form a triangle. -
TriangleFan
Similar toTriangles
, the first 3 vertices specify a triangle, each 2 subsequent vertices are combined with the very first vertex to make a triangle. -
Hybrid
A combination of various triangle modes. It is best to avoid using this mode as it may not be supported by all renderers. Themode start points
andelement lengths
must be specified for this mode. -
Patch
Used for Tessellation only. Requires to set the number of vertices for each patch (default is 3 for triangle tessellation)
-
-
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
-
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 typesPoints
,Lines
andTriangles
.- Returns:
- true if the mode is a list type mode
-