Class IntIntMeshBuilder

java.lang.Object
gaiasky.util.gdx.IntIntMeshBuilder
All Implemented Interfaces:
IntMeshPartBuilder

public class IntIntMeshBuilder extends Object implements IntMeshPartBuilder
Class to construct a mesh, optionally splitting it into one or more mesh parts. Before you can call any other method you must call begin(VertexAttributes) or begin(VertexAttributes, int). To use mesh parts you must call part(String, int) before you start building the part. The MeshPart itself is only valid after the call to end().
  • Nested Class Summary

    Nested classes/interfaces inherited from interface gaiasky.util.gdx.IntMeshPartBuilder

    IntMeshPartBuilder.VertexInfo
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    arrow(float x1, float y1, float z1, float x2, float y2, float z2, float capLength, float stemThickness, int divisions)
    Add an arrow
    void
    begin(com.badlogic.gdx.graphics.VertexAttributes attributes)
    Begin building a mesh.
    void
    begin(com.badlogic.gdx.graphics.VertexAttributes attributes, int primitiveType)
    Begin building a mesh
    void
    begin(Bits attributes)
    Begin building a mesh.
    void
    begin(Bits attributes, int primitiveType)
    Begin building a mesh.
    void
    box(float width, float height, float depth)
    Add a box with the specified dimensions.
    void
    box(float x, float y, float z, float width, float height, float depth)
    Add a box at the specified location, with the specified dimensions
    void
    box(com.badlogic.gdx.math.Matrix4 transform)
    Add a box given the matrix.
    void
    box(com.badlogic.gdx.math.Vector3 corner000, com.badlogic.gdx.math.Vector3 corner010, com.badlogic.gdx.math.Vector3 corner100, com.badlogic.gdx.math.Vector3 corner110, com.badlogic.gdx.math.Vector3 corner001, com.badlogic.gdx.math.Vector3 corner011, com.badlogic.gdx.math.Vector3 corner101, com.badlogic.gdx.math.Vector3 corner111)
    Add a box.
    void
    Add a box.
    void
    capsule(float radius, float height, int divisions)
    Add a capsule
    void
    circle(float radius, int divisions, float centerX, float centerY, float centerZ, float normalX, float normalY, float normalZ)
    Add a circle
    void
    circle(float radius, int divisions, float centerX, float centerY, float centerZ, float normalX, float normalY, float normalZ, float angleFrom, float angleTo)
    Add a circle
    void
    circle(float radius, int divisions, float centerX, float centerY, float centerZ, float normalX, float normalY, float normalZ, float tangentX, float tangentY, float tangentZ, float binormalX, float binormalY, float binormalZ)
    Add a circle
    void
    circle(float radius, int divisions, float centerX, float centerY, float centerZ, float normalX, float normalY, float normalZ, float tangentX, float tangentY, float tangentZ, float binormalX, float binormalY, float binormalZ, float angleFrom, float angleTo)
    Add a circle
    void
    circle(float radius, int divisions, com.badlogic.gdx.math.Vector3 center, com.badlogic.gdx.math.Vector3 normal)
    Add a circle
    void
    circle(float radius, int divisions, com.badlogic.gdx.math.Vector3 center, com.badlogic.gdx.math.Vector3 normal, float angleFrom, float angleTo)
    Add a circle
    void
    circle(float radius, int divisions, com.badlogic.gdx.math.Vector3 center, com.badlogic.gdx.math.Vector3 normal, com.badlogic.gdx.math.Vector3 tangent, com.badlogic.gdx.math.Vector3 binormal)
    Add a circle
    void
    circle(float radius, int divisions, com.badlogic.gdx.math.Vector3 center, com.badlogic.gdx.math.Vector3 normal, com.badlogic.gdx.math.Vector3 tangent, com.badlogic.gdx.math.Vector3 binormal, float angleFrom, float angleTo)
    Add a circle
    void
    cone(float width, float height, float depth, int divisions)
    Add a cone
    void
    cone(float width, float height, float depth, int divisions, float angleFrom, float angleTo)
    Add a cone
    void
    cone(float width, float height, float depth, int divisions, int hdivisions, float angleFrom, float angleTo)
    Add a cone
    static com.badlogic.gdx.graphics.VertexAttributes
     
    void
    cylinder(float width, float height, float depth, int divisions)
    Add a cylinder
    void
    cylinder(float width, float height, float depth, int divisions, float angleFrom, float angleTo)
    Add a cylinder
    void
    cylinder(float width, float height, float depth, int divisions, float angleFrom, float angleTo, boolean close)
    Add a cylinder
    void
    cylinder(float width, float height, float depth, int divisions, float angleFrom, float angleTo, boolean close, boolean flipNormals)
    Add a cylinder
    void
    ellipse(float width, float height, float innerWidth, float innerHeight, int divisions, float centerX, float centerY, float centerZ, float normalX, float normalY, float normalZ)
    Add an ellipse
    void
    ellipse(float width, float height, float innerWidth, float innerHeight, int divisions, float centerX, float centerY, float centerZ, float normalX, float normalY, float normalZ, float angleFrom, float angleTo)
    Add an ellipse
    void
    ellipse(float width, float height, float innerWidth, float innerHeight, int divisions, float centerX, float centerY, float centerZ, float normalX, float normalY, float normalZ, float tangentX, float tangentY, float tangentZ, float binormalX, float binormalY, float binormalZ, float angleFrom, float angleTo)
    Add an ellipse
    void
    ellipse(float width, float height, float innerWidth, float innerHeight, int divisions, com.badlogic.gdx.math.Vector3 center, com.badlogic.gdx.math.Vector3 normal)
    Add an ellipse
    void
    ellipse(float width, float height, int divisions, float centerX, float centerY, float centerZ, float normalX, float normalY, float normalZ)
    Add a circle
    void
    ellipse(float width, float height, int divisions, float centerX, float centerY, float centerZ, float normalX, float normalY, float normalZ, float angleFrom, float angleTo)
    Add a circle
    void
    ellipse(float width, float height, int divisions, float centerX, float centerY, float centerZ, float normalX, float normalY, float normalZ, float tangentX, float tangentY, float tangentZ, float binormalX, float binormalY, float binormalZ)
    Add a circle
    void
    ellipse(float width, float height, int divisions, float centerX, float centerY, float centerZ, float normalX, float normalY, float normalZ, float tangentX, float tangentY, float tangentZ, float binormalX, float binormalY, float binormalZ, float angleFrom, float angleTo)
    Add a circle
    void
    ellipse(float width, float height, int divisions, com.badlogic.gdx.math.Vector3 center, com.badlogic.gdx.math.Vector3 normal)
    Add a circle
    void
    ellipse(float width, float height, int divisions, com.badlogic.gdx.math.Vector3 center, com.badlogic.gdx.math.Vector3 normal, float angleFrom, float angleTo)
    Add a circle
    void
    ellipse(float width, float height, int divisions, com.badlogic.gdx.math.Vector3 center, com.badlogic.gdx.math.Vector3 normal, com.badlogic.gdx.math.Vector3 tangent, com.badlogic.gdx.math.Vector3 binormal)
    Add a circle
    void
    ellipse(float width, float height, int divisions, com.badlogic.gdx.math.Vector3 center, com.badlogic.gdx.math.Vector3 normal, com.badlogic.gdx.math.Vector3 tangent, com.badlogic.gdx.math.Vector3 binormal, float angleFrom, float angleTo)
    Add a circle
    end()
    End building the mesh and returns the mesh
    void
    ensureCapacity(int numVertices, int numIndices)
    Increases the size of the backing vertices and indices arrays to accommodate the specified number of additional vertices and indices.
    void
    ensureIndices(int numIndices)
    Increases the size of the backing indices array to accommodate the specified number of additional indices.
    void
    ensureRectangleIndices(int numRectangles)
    Increases the size of the backing indices array to accommodate the specified number of additional rectangles.
    void
    ensureRectangles(int numRectangles)
    Increases the size of the backing vertices and indices arrays to accommodate the specified number of additional vertices and rectangles.
    void
    ensureRectangles(int numVertices, int numRectangles)
    Increases the size of the backing vertices and indices arrays to accommodate the specified number of additional vertices and rectangles.
    void
    ensureTriangleIndices(int numTriangles)
    Increases the size of the backing indices array to accommodate the specified number of additional triangles.
    void
    ensureTriangles(int numTriangles)
    Increases the size of the backing vertices and indices arrays to accommodate the specified number of additional vertices and triangles.
    void
    ensureTriangles(int numVertices, int numTriangles)
    Increases the size of the backing vertices and indices arrays to accommodate the specified number of additional vertices and triangles.
    void
    ensureVertices(int numVertices)
    Increases the size of the backing vertices array to accommodate the specified number of additional vertices.
    com.badlogic.gdx.graphics.VertexAttributes
     
     
    com.badlogic.gdx.math.Matrix4
    getVertexTransform(com.badlogic.gdx.math.Matrix4 out)
    Get the current vertex transformation matrix.
    void
    icosphere(float radius, int divisions, boolean flipNormals, boolean hardEdges)
    Add an icosphere
    void
    icosphere(float radius, int divisions, boolean flipNormals, boolean hardEdges, int startFace, int nfaces)
    Add an icosphere
    void
    index(int value)
    Add an index, IntMeshPartBuilder expects all meshes to be indexed.
    void
    index(int value1, int value2)
    Add multiple indices, IntMeshPartBuilder expects all meshes to be indexed.
    void
    index(int value1, int value2, int value3)
    Add multiple indices, IntMeshPartBuilder expects all meshes to be indexed.
    void
    index(int value1, int value2, int value3, int value4)
    Add multiple indices, IntMeshPartBuilder expects all meshes to be indexed.
    void
    index(int value1, int value2, int value3, int value4, int value5, int value6)
    Add multiple indices, IntMeshPartBuilder expects all meshes to be indexed.
    void
    index(int value1, int value2, int value3, int value4, int value5, int value6, int value7, int value8)
    Add multiple indices, IntMeshPartBuilder expects all meshes to be indexed.
    boolean
    Indicates whether vertex transformation is enabled.
    int
     
    void
    line(float x1, float y1, float z1, float x2, float y2, float z2)
    Add a line.
    void
    line(int index1, int index2)
    Add a line by indices.
    void
    line(com.badlogic.gdx.math.Vector3 p1, com.badlogic.gdx.graphics.Color c1, com.badlogic.gdx.math.Vector3 p2, com.badlogic.gdx.graphics.Color c2)
    Add a line.
    void
    line(com.badlogic.gdx.math.Vector3 p1, com.badlogic.gdx.math.Vector3 p2)
    Add a line.
    void
    Add a line.
    void
    octahedronsphere(float radius, int divisions, boolean flipNormals, boolean hardEdges)
    Add an octahedronsphere
    void
    octahedronsphere(float radius, int divisions, boolean flipNormals, boolean hardEdges, int startFace, int nfaces)
    Add an octahedronsphere
    part(String id, int primitiveType)
    Starts a new MeshPart.
    void
    patch(float x00, float y00, float z00, float x10, float y10, float z10, float x11, float y11, float z11, float x01, float y01, float z01, float normalX, float normalY, float normalZ, int divisionsU, int divisionsV)
    Add a rectangle.
    void
    patch(com.badlogic.gdx.math.Vector3 corner00, com.badlogic.gdx.math.Vector3 corner10, com.badlogic.gdx.math.Vector3 corner11, com.badlogic.gdx.math.Vector3 corner01, com.badlogic.gdx.math.Vector3 normal, int divisionsU, int divisionsV)
    Add a rectangle.
    void
    patch(IntMeshPartBuilder.VertexInfo corner00, IntMeshPartBuilder.VertexInfo corner10, IntMeshPartBuilder.VertexInfo corner11, IntMeshPartBuilder.VertexInfo corner01, int divisionsU, int divisionsV)
    Add a rectangle.
    void
    rect(float x00, float y00, float z00, float x10, float y10, float z10, float x11, float y11, float z11, float x01, float y01, float z01, float normalX, float normalY, float normalZ)
    Add a rectangle Requires GL_POINTS, GL_LINES or GL_TRIANGLES primitive type.
    void
    rect(int corner00, int corner10, int corner11, int corner01)
    Add a rectangle by indices.
    void
    rect(com.badlogic.gdx.math.Vector3 corner00, com.badlogic.gdx.math.Vector3 corner10, com.badlogic.gdx.math.Vector3 corner11, com.badlogic.gdx.math.Vector3 corner01, com.badlogic.gdx.math.Vector3 normal)
    Add a rectangle.
    void
    Add a rectangle.
    void
    ring(float innerRadius, float outerRadius, int divisions, boolean flipNormals)
    Add a ring
    void
    ring(com.badlogic.gdx.math.Matrix4 transform, float innerRadius, float outerRadius, int divisions, boolean flipNormals)
    Add a ring
    void
    ring(com.badlogic.gdx.math.Matrix4 transform, float innerRadius, float outerRadius, int divisions, boolean flipNormals, float angleStart, float angleEnd)
    Add a ring
    void
    setColor(float r, float g, float b, float a)
    Set the color used if no vertex color is provided.
    void
    setColor(com.badlogic.gdx.graphics.Color color)
    Set the color used if no vertex color is provided, or null to not use a default color.
    void
    setUVRange(float u1, float v1, float u2, float v2)
    Set range of texture coordinates used (default is 0,0,1,1).
    void
    setUVRange(com.badlogic.gdx.graphics.g2d.TextureRegion region)
    Set range of texture coordinates from the specified TextureRegion.
    void
    setVertexTransform(com.badlogic.gdx.math.Matrix4 transform)
    Set the current vertex transformation matrix and enables vertex transformation.
    void
    Sets whether vertex transformation is enabled.
    void
    sphere(float width, float height, float depth, int divisionsU, int divisionsV)
    Add a sphere
    void
    sphere(float width, float height, float depth, int divisionsU, int divisionsV, boolean flipNormals, float angleUFrom, float angleUTo, float angleVFrom, float angleVTo)
    Add a sphere
    void
    sphere(float width, float height, float depth, int divisionsU, int divisionsV, float angleUFrom, float angleUTo, float angleVFrom, float angleVTo)
    Add a sphere
    void
    sphere(com.badlogic.gdx.math.Matrix4 transform, float width, float height, float depth, int divisionsU, int divisionsV)
    Add a sphere
    void
    sphere(com.badlogic.gdx.math.Matrix4 transform, float width, float height, float depth, int divisionsU, int divisionsV, boolean flipNormals, float angleUFrom, float angleUTo, float angleVFrom, float angleVTo)
    Add a sphere
    void
    sphere(com.badlogic.gdx.math.Matrix4 transform, float width, float height, float depth, int divisionsU, int divisionsV, float angleUFrom, float angleUTo, float angleVFrom, float angleVTo)
    Add a sphere
    void
    triangle(int index1, int index2, int index3)
    Add a triangle by indices.
    void
    triangle(com.badlogic.gdx.math.Vector3 p1, com.badlogic.gdx.graphics.Color c1, com.badlogic.gdx.math.Vector3 p2, com.badlogic.gdx.graphics.Color c2, com.badlogic.gdx.math.Vector3 p3, com.badlogic.gdx.graphics.Color c3)
    Add a triangle.
    void
    triangle(com.badlogic.gdx.math.Vector3 p1, com.badlogic.gdx.math.Vector3 p2, com.badlogic.gdx.math.Vector3 p3)
    Add a triangle.
    void
    Add a triangle.
    int
    vertex(float... values)
    Add one or more vertices, returns the index of the last vertex added.
    int
    vertex(com.badlogic.gdx.math.Vector3 pos, com.badlogic.gdx.math.Vector3 nor, com.badlogic.gdx.graphics.Color col, com.badlogic.gdx.math.Vector2 uv)
    Add a vertex, returns the index.
    int
    vertex(com.badlogic.gdx.math.Vector3 pos, com.badlogic.gdx.math.Vector3 nor, com.badlogic.gdx.math.Vector3 tan, com.badlogic.gdx.math.Vector3 bin, com.badlogic.gdx.graphics.Color col, com.badlogic.gdx.math.Vector2 uv)
     
    int
    Add a vertex, returns the index.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • IntIntMeshBuilder

      public IntIntMeshBuilder()
  • Method Details

    • createAttributes

      public static com.badlogic.gdx.graphics.VertexAttributes createAttributes(Bits usage)
      Parameters:
      usage - bitwise mask of the VertexAttributes.Usage, only Position, Color, Normal and TextureCoordinates is supported.
    • begin

      public void begin(Bits attributes)
      Begin building a mesh. Call part(String, int) to start a IntMeshPart.
      Parameters:
      attributes - bitwise mask of the VertexAttributes.Usage, only Position, Color, Normal and TextureCoordinates is supported.
    • begin

      public void begin(com.badlogic.gdx.graphics.VertexAttributes attributes)
      Begin building a mesh. Call part(String, int) to start a IntMeshPart.
    • begin

      public void begin(Bits attributes, int primitiveType)
      Begin building a mesh.
      Parameters:
      attributes - bitwise mask of the VertexAttributes.Usage, only Position, Color, Normal and TextureCoordinates is supported.
    • begin

      public void begin(com.badlogic.gdx.graphics.VertexAttributes attributes, int primitiveType)
      Begin building a mesh
    • part

      public IntMeshPart part(String id, int primitiveType)
      Starts a new MeshPart. The mesh part is not usable until end() is called
    • end

      public IntMesh end()
      End building the mesh and returns the mesh
    • getAttributes

      public com.badlogic.gdx.graphics.VertexAttributes getAttributes()
      Specified by:
      getAttributes in interface IntMeshPartBuilder
      Returns:
      The VertexAttributes available for building.
    • getMeshPart

      public IntMeshPart getMeshPart()
      Specified by:
      getMeshPart in interface IntMeshPartBuilder
      Returns:
      The IntMeshPart currently building.
    • setColor

      public void setColor(float r, float g, float b, float a)
      Description copied from interface: IntMeshPartBuilder
      Set the color used if no vertex color is provided.
      Specified by:
      setColor in interface IntMeshPartBuilder
    • setColor

      public void setColor(com.badlogic.gdx.graphics.Color color)
      Description copied from interface: IntMeshPartBuilder
      Set the color used if no vertex color is provided, or null to not use a default color.
      Specified by:
      setColor in interface IntMeshPartBuilder
    • setUVRange

      public void setUVRange(float u1, float v1, float u2, float v2)
      Description copied from interface: IntMeshPartBuilder
      Set range of texture coordinates used (default is 0,0,1,1).
      Specified by:
      setUVRange in interface IntMeshPartBuilder
    • setUVRange

      public void setUVRange(com.badlogic.gdx.graphics.g2d.TextureRegion region)
      Description copied from interface: IntMeshPartBuilder
      Set range of texture coordinates from the specified TextureRegion.
      Specified by:
      setUVRange in interface IntMeshPartBuilder
    • ensureVertices

      public void ensureVertices(int numVertices)
      Increases the size of the backing vertices array to accommodate the specified number of additional vertices. Useful before adding many vertices to avoid multiple backing array resizes.
      Parameters:
      numVertices - The number of vertices you are about to add
    • ensureIndices

      public void ensureIndices(int numIndices)
      Increases the size of the backing indices array to accommodate the specified number of additional indices. Useful before adding many indices to avoid multiple backing array resizes.
      Parameters:
      numIndices - The number of indices you are about to add
    • ensureCapacity

      public void ensureCapacity(int numVertices, int numIndices)
      Increases the size of the backing vertices and indices arrays to accommodate the specified number of additional vertices and indices. Useful before adding many vertices and indices to avoid multiple backing array resizes.
      Parameters:
      numVertices - The number of vertices you are about to add
      numIndices - The number of indices you are about to add
    • ensureTriangleIndices

      public void ensureTriangleIndices(int numTriangles)
      Increases the size of the backing indices array to accommodate the specified number of additional triangles. Useful before adding many triangles to avoid multiple backing array resizes.
      Parameters:
      numTriangles - The number of triangles you are about to add
    • ensureTriangles

      public void ensureTriangles(int numVertices, int numTriangles)
      Increases the size of the backing vertices and indices arrays to accommodate the specified number of additional vertices and triangles. Useful before adding many triangles to avoid multiple backing array resizes.
      Parameters:
      numVertices - The number of vertices you are about to add
      numTriangles - The number of triangles you are about to add
    • ensureTriangles

      public void ensureTriangles(int numTriangles)
      Increases the size of the backing vertices and indices arrays to accommodate the specified number of additional vertices and triangles. Useful before adding many triangles to avoid multiple backing array resizes. Assumes each triangles adds 3 vertices.
      Parameters:
      numTriangles - The number of triangles you are about to add
    • ensureRectangleIndices

      public void ensureRectangleIndices(int numRectangles)
      Increases the size of the backing indices array to accommodate the specified number of additional rectangles. Useful before adding many rectangles to avoid multiple backing array resizes.
      Parameters:
      numRectangles - The number of rectangles you are about to add
    • ensureRectangles

      public void ensureRectangles(int numVertices, int numRectangles)
      Increases the size of the backing vertices and indices arrays to accommodate the specified number of additional vertices and rectangles. Useful before adding many rectangles to avoid multiple backing array resizes.
      Parameters:
      numVertices - The number of vertices you are about to add
      numRectangles - The number of rectangles you are about to add
    • ensureRectangles

      public void ensureRectangles(int numRectangles)
      Increases the size of the backing vertices and indices arrays to accommodate the specified number of additional vertices and rectangles. Useful before adding many rectangles to avoid multiple backing array resizes. Assumes each rectangles adds 4 vertices
      Parameters:
      numRectangles - The number of rectangles you are about to add
    • lastIndex

      public int lastIndex()
      Specified by:
      lastIndex in interface IntMeshPartBuilder
      Returns:
      The index of the last added vertex.
    • vertex

      public int vertex(com.badlogic.gdx.math.Vector3 pos, com.badlogic.gdx.math.Vector3 nor, com.badlogic.gdx.graphics.Color col, com.badlogic.gdx.math.Vector2 uv)
      Description copied from interface: IntMeshPartBuilder
      Add a vertex, returns the index. Null values are allowed. Use IntMeshPartBuilder.getAttributes() to check which values are available.
      Specified by:
      vertex in interface IntMeshPartBuilder
    • vertex

      public int vertex(com.badlogic.gdx.math.Vector3 pos, com.badlogic.gdx.math.Vector3 nor, com.badlogic.gdx.math.Vector3 tan, com.badlogic.gdx.math.Vector3 bin, com.badlogic.gdx.graphics.Color col, com.badlogic.gdx.math.Vector2 uv)
    • vertex

      public int vertex(float... values)
      Description copied from interface: IntMeshPartBuilder
      Add one or more vertices, returns the index of the last vertex added. The length of values must a power of the vertex size.
      Specified by:
      vertex in interface IntMeshPartBuilder
    • vertex

      public int vertex(IntMeshPartBuilder.VertexInfo info)
      Description copied from interface: IntMeshPartBuilder
      Add a vertex, returns the index. Use IntMeshPartBuilder.getAttributes() to check which values are available.
      Specified by:
      vertex in interface IntMeshPartBuilder
    • index

      public void index(int value)
      Description copied from interface: IntMeshPartBuilder
      Add an index, IntMeshPartBuilder expects all meshes to be indexed.
      Specified by:
      index in interface IntMeshPartBuilder
    • index

      public void index(int value1, int value2)
      Description copied from interface: IntMeshPartBuilder
      Add multiple indices, IntMeshPartBuilder expects all meshes to be indexed.
      Specified by:
      index in interface IntMeshPartBuilder
    • index

      public void index(int value1, int value2, int value3)
      Description copied from interface: IntMeshPartBuilder
      Add multiple indices, IntMeshPartBuilder expects all meshes to be indexed.
      Specified by:
      index in interface IntMeshPartBuilder
    • index

      public void index(int value1, int value2, int value3, int value4)
      Description copied from interface: IntMeshPartBuilder
      Add multiple indices, IntMeshPartBuilder expects all meshes to be indexed.
      Specified by:
      index in interface IntMeshPartBuilder
    • index

      public void index(int value1, int value2, int value3, int value4, int value5, int value6)
      Description copied from interface: IntMeshPartBuilder
      Add multiple indices, IntMeshPartBuilder expects all meshes to be indexed.
      Specified by:
      index in interface IntMeshPartBuilder
    • index

      public void index(int value1, int value2, int value3, int value4, int value5, int value6, int value7, int value8)
      Description copied from interface: IntMeshPartBuilder
      Add multiple indices, IntMeshPartBuilder expects all meshes to be indexed.
      Specified by:
      index in interface IntMeshPartBuilder
    • line

      public void line(int index1, int index2)
      Description copied from interface: IntMeshPartBuilder
      Add a line by indices. Requires GL_LINES primitive type.
      Specified by:
      line in interface IntMeshPartBuilder
    • line

      Description copied from interface: IntMeshPartBuilder
      Add a line. Requires GL_LINES primitive type.
      Specified by:
      line in interface IntMeshPartBuilder
    • line

      public void line(com.badlogic.gdx.math.Vector3 p1, com.badlogic.gdx.math.Vector3 p2)
      Description copied from interface: IntMeshPartBuilder
      Add a line. Requires GL_LINES primitive type.
      Specified by:
      line in interface IntMeshPartBuilder
    • line

      public void line(float x1, float y1, float z1, float x2, float y2, float z2)
      Description copied from interface: IntMeshPartBuilder
      Add a line. Requires GL_LINES primitive type.
      Specified by:
      line in interface IntMeshPartBuilder
    • line

      public void line(com.badlogic.gdx.math.Vector3 p1, com.badlogic.gdx.graphics.Color c1, com.badlogic.gdx.math.Vector3 p2, com.badlogic.gdx.graphics.Color c2)
      Description copied from interface: IntMeshPartBuilder
      Add a line. Requires GL_LINES primitive type.
      Specified by:
      line in interface IntMeshPartBuilder
    • triangle

      public void triangle(int index1, int index2, int index3)
      Description copied from interface: IntMeshPartBuilder
      Add a triangle by indices. Requires GL_POINTS, GL_LINES or GL_TRIANGLES primitive type.
      Specified by:
      triangle in interface IntMeshPartBuilder
    • triangle

      Description copied from interface: IntMeshPartBuilder
      Add a triangle. Requires GL_POINTS, GL_LINES or GL_TRIANGLES primitive type.
      Specified by:
      triangle in interface IntMeshPartBuilder
    • triangle

      public void triangle(com.badlogic.gdx.math.Vector3 p1, com.badlogic.gdx.math.Vector3 p2, com.badlogic.gdx.math.Vector3 p3)
      Description copied from interface: IntMeshPartBuilder
      Add a triangle. Requires GL_POINTS, GL_LINES or GL_TRIANGLES primitive type.
      Specified by:
      triangle in interface IntMeshPartBuilder
    • triangle

      public void triangle(com.badlogic.gdx.math.Vector3 p1, com.badlogic.gdx.graphics.Color c1, com.badlogic.gdx.math.Vector3 p2, com.badlogic.gdx.graphics.Color c2, com.badlogic.gdx.math.Vector3 p3, com.badlogic.gdx.graphics.Color c3)
      Description copied from interface: IntMeshPartBuilder
      Add a triangle. Requires GL_POINTS, GL_LINES or GL_TRIANGLES primitive type.
      Specified by:
      triangle in interface IntMeshPartBuilder
    • rect

      public void rect(int corner00, int corner10, int corner11, int corner01)
      Description copied from interface: IntMeshPartBuilder
      Add a rectangle by indices. Requires GL_POINTS, GL_LINES or GL_TRIANGLES primitive type.
      Specified by:
      rect in interface IntMeshPartBuilder
    • rect

      Description copied from interface: IntMeshPartBuilder
      Add a rectangle. Requires GL_POINTS, GL_LINES or GL_TRIANGLES primitive type.
      Specified by:
      rect in interface IntMeshPartBuilder
    • rect

      public void rect(com.badlogic.gdx.math.Vector3 corner00, com.badlogic.gdx.math.Vector3 corner10, com.badlogic.gdx.math.Vector3 corner11, com.badlogic.gdx.math.Vector3 corner01, com.badlogic.gdx.math.Vector3 normal)
      Description copied from interface: IntMeshPartBuilder
      Add a rectangle. Requires GL_POINTS, GL_LINES or GL_TRIANGLES primitive type.
      Specified by:
      rect in interface IntMeshPartBuilder
    • rect

      public void rect(float x00, float y00, float z00, float x10, float y10, float z10, float x11, float y11, float z11, float x01, float y01, float z01, float normalX, float normalY, float normalZ)
      Description copied from interface: IntMeshPartBuilder
      Add a rectangle Requires GL_POINTS, GL_LINES or GL_TRIANGLES primitive type.
      Specified by:
      rect in interface IntMeshPartBuilder
    • patch

      public void patch(IntMeshPartBuilder.VertexInfo corner00, IntMeshPartBuilder.VertexInfo corner10, IntMeshPartBuilder.VertexInfo corner11, IntMeshPartBuilder.VertexInfo corner01, int divisionsU, int divisionsV)
      Description copied from interface: IntMeshPartBuilder
      Add a rectangle. Requires GL_POINTS, GL_LINES or GL_TRIANGLES primitive type.
      Specified by:
      patch in interface IntMeshPartBuilder
    • patch

      public void patch(com.badlogic.gdx.math.Vector3 corner00, com.badlogic.gdx.math.Vector3 corner10, com.badlogic.gdx.math.Vector3 corner11, com.badlogic.gdx.math.Vector3 corner01, com.badlogic.gdx.math.Vector3 normal, int divisionsU, int divisionsV)
      Description copied from interface: IntMeshPartBuilder
      Add a rectangle. Requires GL_POINTS, GL_LINES or GL_TRIANGLES primitive type.
      Specified by:
      patch in interface IntMeshPartBuilder
    • patch

      public void patch(float x00, float y00, float z00, float x10, float y10, float z10, float x11, float y11, float z11, float x01, float y01, float z01, float normalX, float normalY, float normalZ, int divisionsU, int divisionsV)
      Description copied from interface: IntMeshPartBuilder
      Add a rectangle. Requires GL_POINTS, GL_LINES or GL_TRIANGLES primitive type.
      Specified by:
      patch in interface IntMeshPartBuilder
    • box

      Description copied from interface: IntMeshPartBuilder
      Add a box. Requires GL_POINTS, GL_LINES or GL_TRIANGLES primitive type.
      Specified by:
      box in interface IntMeshPartBuilder
    • box

      public void box(com.badlogic.gdx.math.Vector3 corner000, com.badlogic.gdx.math.Vector3 corner010, com.badlogic.gdx.math.Vector3 corner100, com.badlogic.gdx.math.Vector3 corner110, com.badlogic.gdx.math.Vector3 corner001, com.badlogic.gdx.math.Vector3 corner011, com.badlogic.gdx.math.Vector3 corner101, com.badlogic.gdx.math.Vector3 corner111)
      Description copied from interface: IntMeshPartBuilder
      Add a box. Requires GL_POINTS, GL_LINES or GL_TRIANGLES primitive type.
      Specified by:
      box in interface IntMeshPartBuilder
    • box

      public void box(com.badlogic.gdx.math.Matrix4 transform)
      Description copied from interface: IntMeshPartBuilder
      Add a box given the matrix. Requires GL_POINTS, GL_LINES or GL_TRIANGLES primitive type.
      Specified by:
      box in interface IntMeshPartBuilder
    • box

      public void box(float width, float height, float depth)
      Description copied from interface: IntMeshPartBuilder
      Add a box with the specified dimensions. Requires GL_POINTS, GL_LINES or GL_TRIANGLES primitive type.
      Specified by:
      box in interface IntMeshPartBuilder
    • box

      public void box(float x, float y, float z, float width, float height, float depth)
      Description copied from interface: IntMeshPartBuilder
      Add a box at the specified location, with the specified dimensions
      Specified by:
      box in interface IntMeshPartBuilder
    • circle

      public void circle(float radius, int divisions, float centerX, float centerY, float centerZ, float normalX, float normalY, float normalZ)
      Description copied from interface: IntMeshPartBuilder
      Add a circle
      Specified by:
      circle in interface IntMeshPartBuilder
    • circle

      public void circle(float radius, int divisions, com.badlogic.gdx.math.Vector3 center, com.badlogic.gdx.math.Vector3 normal)
      Description copied from interface: IntMeshPartBuilder
      Add a circle
      Specified by:
      circle in interface IntMeshPartBuilder
    • circle

      public void circle(float radius, int divisions, com.badlogic.gdx.math.Vector3 center, com.badlogic.gdx.math.Vector3 normal, com.badlogic.gdx.math.Vector3 tangent, com.badlogic.gdx.math.Vector3 binormal)
      Description copied from interface: IntMeshPartBuilder
      Add a circle
      Specified by:
      circle in interface IntMeshPartBuilder
    • circle

      public void circle(float radius, int divisions, float centerX, float centerY, float centerZ, float normalX, float normalY, float normalZ, float tangentX, float tangentY, float tangentZ, float binormalX, float binormalY, float binormalZ)
      Description copied from interface: IntMeshPartBuilder
      Add a circle
      Specified by:
      circle in interface IntMeshPartBuilder
    • circle

      public void circle(float radius, int divisions, float centerX, float centerY, float centerZ, float normalX, float normalY, float normalZ, float angleFrom, float angleTo)
      Description copied from interface: IntMeshPartBuilder
      Add a circle
      Specified by:
      circle in interface IntMeshPartBuilder
    • circle

      public void circle(float radius, int divisions, com.badlogic.gdx.math.Vector3 center, com.badlogic.gdx.math.Vector3 normal, float angleFrom, float angleTo)
      Description copied from interface: IntMeshPartBuilder
      Add a circle
      Specified by:
      circle in interface IntMeshPartBuilder
    • circle

      public void circle(float radius, int divisions, com.badlogic.gdx.math.Vector3 center, com.badlogic.gdx.math.Vector3 normal, com.badlogic.gdx.math.Vector3 tangent, com.badlogic.gdx.math.Vector3 binormal, float angleFrom, float angleTo)
      Description copied from interface: IntMeshPartBuilder
      Add a circle
      Specified by:
      circle in interface IntMeshPartBuilder
    • circle

      public void circle(float radius, int divisions, float centerX, float centerY, float centerZ, float normalX, float normalY, float normalZ, float tangentX, float tangentY, float tangentZ, float binormalX, float binormalY, float binormalZ, float angleFrom, float angleTo)
      Description copied from interface: IntMeshPartBuilder
      Add a circle
      Specified by:
      circle in interface IntMeshPartBuilder
    • ellipse

      public void ellipse(float width, float height, int divisions, float centerX, float centerY, float centerZ, float normalX, float normalY, float normalZ)
      Description copied from interface: IntMeshPartBuilder
      Add a circle
      Specified by:
      ellipse in interface IntMeshPartBuilder
    • ellipse

      public void ellipse(float width, float height, int divisions, com.badlogic.gdx.math.Vector3 center, com.badlogic.gdx.math.Vector3 normal)
      Description copied from interface: IntMeshPartBuilder
      Add a circle
      Specified by:
      ellipse in interface IntMeshPartBuilder
    • ellipse

      public void ellipse(float width, float height, int divisions, com.badlogic.gdx.math.Vector3 center, com.badlogic.gdx.math.Vector3 normal, com.badlogic.gdx.math.Vector3 tangent, com.badlogic.gdx.math.Vector3 binormal)
      Description copied from interface: IntMeshPartBuilder
      Add a circle
      Specified by:
      ellipse in interface IntMeshPartBuilder
    • ellipse

      public void ellipse(float width, float height, int divisions, float centerX, float centerY, float centerZ, float normalX, float normalY, float normalZ, float tangentX, float tangentY, float tangentZ, float binormalX, float binormalY, float binormalZ)
      Description copied from interface: IntMeshPartBuilder
      Add a circle
      Specified by:
      ellipse in interface IntMeshPartBuilder
    • ellipse

      public void ellipse(float width, float height, int divisions, float centerX, float centerY, float centerZ, float normalX, float normalY, float normalZ, float angleFrom, float angleTo)
      Description copied from interface: IntMeshPartBuilder
      Add a circle
      Specified by:
      ellipse in interface IntMeshPartBuilder
    • ellipse

      public void ellipse(float width, float height, int divisions, com.badlogic.gdx.math.Vector3 center, com.badlogic.gdx.math.Vector3 normal, float angleFrom, float angleTo)
      Description copied from interface: IntMeshPartBuilder
      Add a circle
      Specified by:
      ellipse in interface IntMeshPartBuilder
    • ellipse

      public void ellipse(float width, float height, int divisions, com.badlogic.gdx.math.Vector3 center, com.badlogic.gdx.math.Vector3 normal, com.badlogic.gdx.math.Vector3 tangent, com.badlogic.gdx.math.Vector3 binormal, float angleFrom, float angleTo)
      Description copied from interface: IntMeshPartBuilder
      Add a circle
      Specified by:
      ellipse in interface IntMeshPartBuilder
    • ellipse

      public void ellipse(float width, float height, int divisions, float centerX, float centerY, float centerZ, float normalX, float normalY, float normalZ, float tangentX, float tangentY, float tangentZ, float binormalX, float binormalY, float binormalZ, float angleFrom, float angleTo)
      Description copied from interface: IntMeshPartBuilder
      Add a circle
      Specified by:
      ellipse in interface IntMeshPartBuilder
    • ellipse

      public void ellipse(float width, float height, float innerWidth, float innerHeight, int divisions, com.badlogic.gdx.math.Vector3 center, com.badlogic.gdx.math.Vector3 normal)
      Description copied from interface: IntMeshPartBuilder
      Add an ellipse
      Specified by:
      ellipse in interface IntMeshPartBuilder
    • ellipse

      public void ellipse(float width, float height, float innerWidth, float innerHeight, int divisions, float centerX, float centerY, float centerZ, float normalX, float normalY, float normalZ)
      Description copied from interface: IntMeshPartBuilder
      Add an ellipse
      Specified by:
      ellipse in interface IntMeshPartBuilder
    • ellipse

      public void ellipse(float width, float height, float innerWidth, float innerHeight, int divisions, float centerX, float centerY, float centerZ, float normalX, float normalY, float normalZ, float angleFrom, float angleTo)
      Description copied from interface: IntMeshPartBuilder
      Add an ellipse
      Specified by:
      ellipse in interface IntMeshPartBuilder
    • ellipse

      public void ellipse(float width, float height, float innerWidth, float innerHeight, int divisions, float centerX, float centerY, float centerZ, float normalX, float normalY, float normalZ, float tangentX, float tangentY, float tangentZ, float binormalX, float binormalY, float binormalZ, float angleFrom, float angleTo)
      Description copied from interface: IntMeshPartBuilder
      Add an ellipse
      Specified by:
      ellipse in interface IntMeshPartBuilder
    • cylinder

      public void cylinder(float width, float height, float depth, int divisions)
      Description copied from interface: IntMeshPartBuilder
      Add a cylinder
      Specified by:
      cylinder in interface IntMeshPartBuilder
    • cylinder

      public void cylinder(float width, float height, float depth, int divisions, float angleFrom, float angleTo)
      Description copied from interface: IntMeshPartBuilder
      Add a cylinder
      Specified by:
      cylinder in interface IntMeshPartBuilder
    • cylinder

      public void cylinder(float width, float height, float depth, int divisions, float angleFrom, float angleTo, boolean close)
      Add a cylinder
      Specified by:
      cylinder in interface IntMeshPartBuilder
    • cone

      public void cone(float width, float height, float depth, int divisions)
      Description copied from interface: IntMeshPartBuilder
      Add a cone
      Specified by:
      cone in interface IntMeshPartBuilder
    • cone

      public void cone(float width, float height, float depth, int divisions, float angleFrom, float angleTo)
      Description copied from interface: IntMeshPartBuilder
      Add a cone
      Specified by:
      cone in interface IntMeshPartBuilder
    • cone

      public void cone(float width, float height, float depth, int divisions, int hdivisions, float angleFrom, float angleTo)
      Description copied from interface: IntMeshPartBuilder
      Add a cone
      Specified by:
      cone in interface IntMeshPartBuilder
    • sphere

      public void sphere(float width, float height, float depth, int divisionsU, int divisionsV)
      Description copied from interface: IntMeshPartBuilder
      Add a sphere
      Specified by:
      sphere in interface IntMeshPartBuilder
    • sphere

      public void sphere(com.badlogic.gdx.math.Matrix4 transform, float width, float height, float depth, int divisionsU, int divisionsV)
      Description copied from interface: IntMeshPartBuilder
      Add a sphere
      Specified by:
      sphere in interface IntMeshPartBuilder
    • sphere

      public void sphere(float width, float height, float depth, int divisionsU, int divisionsV, float angleUFrom, float angleUTo, float angleVFrom, float angleVTo)
      Description copied from interface: IntMeshPartBuilder
      Add a sphere
      Specified by:
      sphere in interface IntMeshPartBuilder
    • sphere

      public void sphere(com.badlogic.gdx.math.Matrix4 transform, float width, float height, float depth, int divisionsU, int divisionsV, float angleUFrom, float angleUTo, float angleVFrom, float angleVTo)
      Description copied from interface: IntMeshPartBuilder
      Add a sphere
      Specified by:
      sphere in interface IntMeshPartBuilder
    • capsule

      public void capsule(float radius, float height, int divisions)
      Description copied from interface: IntMeshPartBuilder
      Add a capsule
      Specified by:
      capsule in interface IntMeshPartBuilder
    • arrow

      public void arrow(float x1, float y1, float z1, float x2, float y2, float z2, float capLength, float stemThickness, int divisions)
      Description copied from interface: IntMeshPartBuilder
      Add an arrow
      Specified by:
      arrow in interface IntMeshPartBuilder
      Parameters:
      x1 - source x
      y1 - source y
      z1 - source z
      x2 - destination x
      y2 - destination y
      z2 - destination z
      capLength - is the height of the cap in percentage, must be in (0,1)
      stemThickness - is the percentage of stem diameter compared to cap diameter, must be in (0,1]
      divisions - the amount of vertices used to generate the cap and stem ellipsoidal bases
    • getVertexTransform

      public com.badlogic.gdx.math.Matrix4 getVertexTransform(com.badlogic.gdx.math.Matrix4 out)
      Description copied from interface: IntMeshPartBuilder
      Get the current vertex transformation matrix.
      Specified by:
      getVertexTransform in interface IntMeshPartBuilder
    • setVertexTransform

      public void setVertexTransform(com.badlogic.gdx.math.Matrix4 transform)
      Description copied from interface: IntMeshPartBuilder
      Set the current vertex transformation matrix and enables vertex transformation.
      Specified by:
      setVertexTransform in interface IntMeshPartBuilder
    • isVertexTransformationEnabled

      public boolean isVertexTransformationEnabled()
      Description copied from interface: IntMeshPartBuilder
      Indicates whether vertex transformation is enabled.
      Specified by:
      isVertexTransformationEnabled in interface IntMeshPartBuilder
    • setVertexTransformationEnabled

      public void setVertexTransformationEnabled(boolean enabled)
      Description copied from interface: IntMeshPartBuilder
      Sets whether vertex transformation is enabled.
      Specified by:
      setVertexTransformationEnabled in interface IntMeshPartBuilder
    • icosphere

      public void icosphere(float radius, int divisions, boolean flipNormals, boolean hardEdges)
      Description copied from interface: IntMeshPartBuilder
      Add an icosphere
      Specified by:
      icosphere in interface IntMeshPartBuilder
    • icosphere

      public void icosphere(float radius, int divisions, boolean flipNormals, boolean hardEdges, int startFace, int nfaces)
      Description copied from interface: IntMeshPartBuilder
      Add an icosphere
      Specified by:
      icosphere in interface IntMeshPartBuilder
    • octahedronsphere

      public void octahedronsphere(float radius, int divisions, boolean flipNormals, boolean hardEdges)
      Description copied from interface: IntMeshPartBuilder
      Add an octahedronsphere
      Specified by:
      octahedronsphere in interface IntMeshPartBuilder
    • octahedronsphere

      public void octahedronsphere(float radius, int divisions, boolean flipNormals, boolean hardEdges, int startFace, int nfaces)
      Description copied from interface: IntMeshPartBuilder
      Add an octahedronsphere
      Specified by:
      octahedronsphere in interface IntMeshPartBuilder
    • sphere

      public void sphere(float width, float height, float depth, int divisionsU, int divisionsV, boolean flipNormals, float angleUFrom, float angleUTo, float angleVFrom, float angleVTo)
      Description copied from interface: IntMeshPartBuilder
      Add a sphere
      Specified by:
      sphere in interface IntMeshPartBuilder
    • sphere

      public void sphere(com.badlogic.gdx.math.Matrix4 transform, float width, float height, float depth, int divisionsU, int divisionsV, boolean flipNormals, float angleUFrom, float angleUTo, float angleVFrom, float angleVTo)
      Description copied from interface: IntMeshPartBuilder
      Add a sphere
      Specified by:
      sphere in interface IntMeshPartBuilder
    • cylinder

      public void cylinder(float width, float height, float depth, int divisions, float angleFrom, float angleTo, boolean close, boolean flipNormals)
      Description copied from interface: IntMeshPartBuilder
      Add a cylinder
      Specified by:
      cylinder in interface IntMeshPartBuilder
    • ring

      public void ring(float innerRadius, float outerRadius, int divisions, boolean flipNormals)
      Description copied from interface: IntMeshPartBuilder
      Add a ring
      Specified by:
      ring in interface IntMeshPartBuilder
    • ring

      public void ring(com.badlogic.gdx.math.Matrix4 transform, float innerRadius, float outerRadius, int divisions, boolean flipNormals)
      Description copied from interface: IntMeshPartBuilder
      Add a ring
      Specified by:
      ring in interface IntMeshPartBuilder
    • ring

      public void ring(com.badlogic.gdx.math.Matrix4 transform, float innerRadius, float outerRadius, int divisions, boolean flipNormals, float angleStart, float angleEnd)
      Description copied from interface: IntMeshPartBuilder
      Add a ring
      Specified by:
      ring in interface IntMeshPartBuilder