Package graphics

Enum Class Primitive

All Implemented Interfaces:
Serializable, Comparable<Primitive>, Constable

public enum Primitive extends Enum<Primitive>

Azurite

A primitive is a simple shape that contains all the information necessary to prepare an element buffer of that primitive's type. The primitives available are:
  • Quadrilateral
  • Line
See Also:
  • Enum Constant Details

  • Field Details

    • vertexCount

      public final int vertexCount
      Number of vertices in the primitive
    • elementCount

      public final int elementCount
      Number of elements in the primitive
    • openglPrimitive

      public final int openglPrimitive
      Primitive ID that opengl expects
    • elementCreation

      public final BiConsumer<IntBuffer,Integer> elementCreation
      Puts index data in the provided int buffer
  • Method Details

    • values

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