Package com.ardor3d.renderer
Enum Class IndexMode
- All Implemented Interfaces:
Serializable
,Comparable<IndexMode>
,Constable
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionIdentical to LineStrip except the final indexed vertex is then connected back to the initial vertex to form a loop.Every two vertices referenced by the indexbuffer will be considered a stand-alone line segment.The first two vertices referenced by the indexbuffer create a line, from there, every additional vertex is paired with the preceding vertex to make a new, connected line.Identical to Connected except the final indexed vertex is then connected back to the initial vertex to form a loop.Every four vertices referenced by the indexbuffer will be considered a stand-alone quad.The first four vertices referenced by the indexbuffer create a triangle, from there, every two additional vertices are paired with the two preceding vertices to make a new quad.The first three vertices (V0, V1, V2) referenced by the indexbuffer create a triangle, from there, every additional vertex is paired with the preceding vertex and the initial vertex (V0) to make a new triangle.Every three vertices referenced by the indexbuffer will be considered a stand-alone triangle.The first three vertices referenced by the indexbuffer create a triangle, from there, every additional vertex is paired with the two preceding vertices to make a new triangle. -
Method Summary
Modifier and TypeMethodDescriptionstatic int
getPrimitiveCount
(IndexMode indexMode, int size) int
boolean
static IndexMode
Returns the enum constant of this class with the specified name.static IndexMode[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
Triangles
Every three vertices referenced by the indexbuffer will be considered a stand-alone triangle. -
TriangleStrip
The first three vertices referenced by the indexbuffer create a triangle, from there, every additional vertex is paired with the two preceding vertices to make a new triangle. -
TriangleFan
The first three vertices (V0, V1, V2) referenced by the indexbuffer create a triangle, from there, every additional vertex is paired with the preceding vertex and the initial vertex (V0) to make a new triangle. -
Quads
Every four vertices referenced by the indexbuffer will be considered a stand-alone quad. -
QuadStrip
The first four vertices referenced by the indexbuffer create a triangle, from there, every two additional vertices are paired with the two preceding vertices to make a new quad. -
Lines
Every two vertices referenced by the indexbuffer will be considered a stand-alone line segment. -
LineStrip
The first two vertices referenced by the indexbuffer create a line, from there, every additional vertex is paired with the preceding vertex to make a new, connected line. -
LineLoop
Identical to LineStrip except the final indexed vertex is then connected back to the initial vertex to form a loop. -
Points
Identical to Connected except the final indexed vertex is then connected back to the initial vertex to form a loop.
-
-
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
-
hasPolygons
public boolean hasPolygons() -
getVertexCount
public int getVertexCount() -
getPrimitiveCount
- Parameters:
indexMode
- the index modesize
- the size- Returns:
- the number of primitives you would have if you connected an array of points of the given size using the given index mode.
-