Enum Class IndexMode

java.lang.Object
java.lang.Enum<IndexMode>
com.ardor3d.renderer.IndexMode
All Implemented Interfaces:
Serializable, Comparable<IndexMode>, Constable

public enum IndexMode extends Enum<IndexMode>
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Identical 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 Type
    Method
    Description
    static int
    getPrimitiveCount(IndexMode indexMode, int size)
     
    int
     
    boolean
     
    static IndexMode
    Returns the enum constant of this class with the specified name.
    static IndexMode[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • Triangles

      public static final IndexMode Triangles
      Every three vertices referenced by the indexbuffer will be considered a stand-alone triangle.
    • TriangleStrip

      public static final IndexMode 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

      public static final IndexMode 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

      public static final IndexMode Quads
      Every four vertices referenced by the indexbuffer will be considered a stand-alone quad.
    • QuadStrip

      public static final IndexMode 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

      public static final IndexMode Lines
      Every two vertices referenced by the indexbuffer will be considered a stand-alone line segment.
    • LineStrip

      public static final IndexMode 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

      public static final IndexMode LineLoop
      Identical to LineStrip except the final indexed vertex is then connected back to the initial vertex to form a loop.
    • Points

      public static final IndexMode Points
      Identical to Connected except the final indexed vertex is then connected back to the initial vertex to form a loop.
  • Method Details

    • values

      public static IndexMode[] 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

      public static IndexMode valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • hasPolygons

      public boolean hasPolygons()
    • getVertexCount

      public int getVertexCount()
    • getPrimitiveCount

      public static int getPrimitiveCount(IndexMode indexMode, int size)
      Parameters:
      indexMode - the index mode
      size - 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.