Enum Class Mesh.Mode

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

public static enum Mesh.Mode extends 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.
  • 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
    A combination of various triangle modes.
    Identical to LineStrip 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 to Triangles, 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 to Triangles, the first 3 vertices specify a triangle, while subsequent vertices are combined with the previous two to form a triangle.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    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[]
    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

    • Points

      public static final Mesh.Mode Points
      A primitive is a single point in space. The size of points are determined via the vertex shader's gl_PointSize output.
    • Lines

      public static final Mesh.Mode Lines
      A primitive is a line segment. Every two vertices specify a single line. Material.getAdditionalRenderState() and RenderState.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. Material.getAdditionalRenderState() and RenderState.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. Material.getAdditionalRenderState() and RenderState.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.
    • Patch

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

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