Class MeshBuilder

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int MAX_INDEX
      highest index mesh builder can get (64k - 1)
      static int MAX_VERTICES
      maximum number of vertices mesh builder can hold (64k)
    • Constructor Summary

      Constructors 
      Constructor Description
      MeshBuilder()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      void addMesh​(float[] vertices, short[] indices)
      Copies a mesh to the mesh (part) currently being build.
      void addMesh​(float[] vertices, short[] indices, int indexOffset, int numIndices)
      Copies a (part of a) mesh to the mesh (part) currently being build.
      void addMesh​(MeshPart meshpart)
      Copies a MeshPart to the mesh (part) currently being build.
      void addMesh​(Mesh mesh)
      Copies a mesh to the mesh (part) currently being build.
      void addMesh​(Mesh mesh, int indexOffset, int numIndices)
      Copies a (part of a) mesh to the mesh (part) currently being build.
      void arrow​(float x1, float y1, float z1, float x2, float y2, float z2, float capLength, float stemThickness, int divisions)
      Deprecated.
      void begin​(long attributes)
      Begin building a mesh.
      void begin​(long attributes, int primitiveType)
      Begin building a mesh.
      void begin​(VertexAttributes attributes)
      Begin building a mesh.
      void begin​(VertexAttributes attributes, int primitiveType)
      Begin building a mesh
      void box​(float width, float height, float depth)
      Deprecated.
      void box​(float x, float y, float z, float width, float height, float depth)
      Deprecated.
      void box​(MeshPartBuilder.VertexInfo corner000, MeshPartBuilder.VertexInfo corner010, MeshPartBuilder.VertexInfo corner100, MeshPartBuilder.VertexInfo corner110, MeshPartBuilder.VertexInfo corner001, MeshPartBuilder.VertexInfo corner011, MeshPartBuilder.VertexInfo corner101, MeshPartBuilder.VertexInfo corner111)
      Deprecated.
      void box​(Matrix4 transform)
      Deprecated.
      void box​(Vector3 corner000, Vector3 corner010, Vector3 corner100, Vector3 corner110, Vector3 corner001, Vector3 corner011, Vector3 corner101, Vector3 corner111)
      Deprecated.
      void capsule​(float radius, float height, int divisions)
      Deprecated.
      void circle​(float radius, int divisions, float centerX, float centerY, float centerZ, float normalX, float normalY, float normalZ)
      Deprecated.
      void circle​(float radius, int divisions, float centerX, float centerY, float centerZ, float normalX, float normalY, float normalZ, float angleFrom, float angleTo)
      Deprecated.
      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)
      Deprecated.
      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)
      Deprecated.
      void circle​(float radius, int divisions, Vector3 center, Vector3 normal)
      Deprecated.
      void circle​(float radius, int divisions, Vector3 center, Vector3 normal, float angleFrom, float angleTo)
      Deprecated.
      void circle​(float radius, int divisions, Vector3 center, Vector3 normal, Vector3 tangent, Vector3 binormal)
      Deprecated.
      void circle​(float radius, int divisions, Vector3 center, Vector3 normal, Vector3 tangent, Vector3 binormal, float angleFrom, float angleTo)
      Deprecated.
      void clear()
      Clears the data being built up until now, including the vertices, indices and all parts.
      void cone​(float width, float height, float depth, int divisions)
      Deprecated.
      void cone​(float width, float height, float depth, int divisions, float angleFrom, float angleTo)
      Deprecated.
      static VertexAttributes createAttributes​(long usage)  
      void cylinder​(float width, float height, float depth, int divisions)
      Deprecated.
      void cylinder​(float width, float height, float depth, int divisions, float angleFrom, float angleTo)
      Deprecated.
      void cylinder​(float width, float height, float depth, int divisions, float angleFrom, float angleTo, boolean close)
      Deprecated.
      void ellipse​(float width, float height, float innerWidth, float innerHeight, int divisions, float centerX, float centerY, float centerZ, float normalX, float normalY, float normalZ)
      Deprecated.
      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)
      Deprecated.
      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)
      Deprecated.
      void ellipse​(float width, float height, float innerWidth, float innerHeight, int divisions, Vector3 center, Vector3 normal)
      Deprecated.
      void ellipse​(float width, float height, int divisions, float centerX, float centerY, float centerZ, float normalX, float normalY, float normalZ)
      Deprecated.
      void ellipse​(float width, float height, int divisions, float centerX, float centerY, float centerZ, float normalX, float normalY, float normalZ, float angleFrom, float angleTo)
      Deprecated.
      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)
      Deprecated.
      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)
      Deprecated.
      void ellipse​(float width, float height, int divisions, Vector3 center, Vector3 normal)
      Deprecated.
      void ellipse​(float width, float height, int divisions, Vector3 center, Vector3 normal, float angleFrom, float angleTo)
      Deprecated.
      void ellipse​(float width, float height, int divisions, Vector3 center, Vector3 normal, Vector3 tangent, Vector3 binormal)
      Deprecated.
      void ellipse​(float width, float height, int divisions, Vector3 center, Vector3 normal, Vector3 tangent, Vector3 binormal, float angleFrom, float angleTo)
      Deprecated.
      Mesh end()
      End building the mesh and returns the mesh
      Mesh end​(Mesh mesh)
      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)
      Deprecated.
      void ensureRectangles​(int numVertices, int numRectangles)
      Deprecated.
      void ensureTriangleIndices​(int numTriangles)
      Increases the size of the backing indices array to accommodate the specified number of additional triangles.
      void ensureTriangles​(int numTriangles)
      Deprecated.
      void ensureTriangles​(int numVertices, int numTriangles)
      Deprecated.
      void ensureVertices​(int numVertices)
      Increases the size of the backing vertices array to accommodate the specified number of additional vertices.
      VertexAttributes getAttributes()  
      int getFloatsPerVertex()  
      protected short[] getIndices()
      Provides direct access to the indices array being built, use with care.
      void getIndices​(short[] out, int destOffset)
      Get a copy of the indices built so far.
      MeshPart getMeshPart()  
      int getNumIndices()  
      int getNumVertices()  
      int getPrimitiveType()  
      Matrix4 getVertexTransform​(Matrix4 out)
      Get the current vertex transformation matrix.
      protected float[] getVertices()
      Provides direct access to the vertices array being built, use with care.
      void getVertices​(float[] out, int destOffset)
      Get a copy of the vertices built so far.
      void index​(short value)
      Add an index, MeshPartBuilder expects all meshes to be indexed.
      void index​(short value1, short value2)
      Add multiple indices, MeshPartBuilder expects all meshes to be indexed.
      void index​(short value1, short value2, short value3)
      Add multiple indices, MeshPartBuilder expects all meshes to be indexed.
      void index​(short value1, short value2, short value3, short value4)
      Add multiple indices, MeshPartBuilder expects all meshes to be indexed.
      void index​(short value1, short value2, short value3, short value4, short value5, short value6)
      Add multiple indices, MeshPartBuilder expects all meshes to be indexed.
      void index​(short value1, short value2, short value3, short value4, short value5, short value6, short value7, short value8)
      Add multiple indices, MeshPartBuilder expects all meshes to be indexed.
      boolean isVertexTransformationEnabled()
      Indicates whether vertex transformation is enabled.
      int lastIndex()  
      void line​(float x1, float y1, float z1, float x2, float y2, float z2)
      Add a line.
      void line​(short index1, short index2)
      Add a line by indices.
      void line​(MeshPartBuilder.VertexInfo p1, MeshPartBuilder.VertexInfo p2)
      Add a line.
      void line​(Vector3 p1, Color c1, Vector3 p2, Color c2)
      Add a line.
      void line​(Vector3 p1, Vector3 p2)
      Add a line.
      MeshPart part​(java.lang.String id, int primitiveType)
      Starts a new MeshPart.
      MeshPart part​(java.lang.String id, int primitiveType, MeshPart meshPart)
      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)
      Deprecated.
      void patch​(MeshPartBuilder.VertexInfo corner00, MeshPartBuilder.VertexInfo corner10, MeshPartBuilder.VertexInfo corner11, MeshPartBuilder.VertexInfo corner01, int divisionsU, int divisionsV)
      Deprecated.
      void patch​(Vector3 corner00, Vector3 corner10, Vector3 corner11, Vector3 corner01, Vector3 normal, int divisionsU, int divisionsV)
      Deprecated.
      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​(short corner00, short corner10, short corner11, short corner01)
      Add a rectangle by indices.
      void rect​(MeshPartBuilder.VertexInfo corner00, MeshPartBuilder.VertexInfo corner10, MeshPartBuilder.VertexInfo corner11, MeshPartBuilder.VertexInfo corner01)
      Add a rectangle.
      void rect​(Vector3 corner00, Vector3 corner10, Vector3 corner11, Vector3 corner01, Vector3 normal)
      Add a rectangle.
      void setColor​(float r, float g, float b, float a)
      Set the color used to tint the vertex color, defaults to white.
      void setColor​(Color color)
      Set the color used to tint the vertex color, defaults to white.
      void setUVRange​(float u1, float v1, float u2, float v2)
      Set range of texture coordinates used (default is 0,0,1,1).
      void setUVRange​(TextureRegion region)
      Set range of texture coordinates from the specified TextureRegion.
      void setVertexTransform​(Matrix4 transform)
      Set the current vertex transformation matrix and enables vertex transformation.
      void setVertexTransformationEnabled​(boolean enabled)
      Sets whether vertex transformation is enabled.
      void sphere​(float width, float height, float depth, int divisionsU, int divisionsV)
      Deprecated.
      void sphere​(float width, float height, float depth, int divisionsU, int divisionsV, float angleUFrom, float angleUTo, float angleVFrom, float angleVTo)
      Deprecated.
      void sphere​(Matrix4 transform, float width, float height, float depth, int divisionsU, int divisionsV)
      Deprecated.
      void sphere​(Matrix4 transform, float width, float height, float depth, int divisionsU, int divisionsV, float angleUFrom, float angleUTo, float angleVFrom, float angleVTo)
      Deprecated.
      void triangle​(short index1, short index2, short index3)
      Add a triangle by indices.
      void triangle​(MeshPartBuilder.VertexInfo p1, MeshPartBuilder.VertexInfo p2, MeshPartBuilder.VertexInfo p3)
      Add a triangle.
      void triangle​(Vector3 p1, Color c1, Vector3 p2, Color c2, Vector3 p3, Color c3)
      Add a triangle.
      void triangle​(Vector3 p1, Vector3 p2, Vector3 p3)
      Add a triangle.
      short vertex​(float... values)
      Add one or more vertices, returns the index of the last vertex added.
      short vertex​(MeshPartBuilder.VertexInfo info)
      Add a vertex, returns the index.
      short vertex​(Vector3 pos, Vector3 nor, Color col, Vector2 uv)
      Add a vertex, returns the index.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • MAX_VERTICES

        public static final int MAX_VERTICES
        maximum number of vertices mesh builder can hold (64k)
        See Also:
        Constant Field Values
      • MAX_INDEX

        public static final int MAX_INDEX
        highest index mesh builder can get (64k - 1)
        See Also:
        Constant Field Values
    • Constructor Detail

      • MeshBuilder

        public MeshBuilder()
    • Method Detail

      • createAttributes

        public static VertexAttributes createAttributes​(long usage)
        Parameters:
        usage - bitwise mask of the VertexAttributes.Usage, only Position, Color, Normal and TextureCoordinates is supported.
      • begin

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

        public void begin​(long 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​(VertexAttributes attributes,
                          int primitiveType)
        Begin building a mesh
      • part

        public MeshPart part​(java.lang.String id,
                             int primitiveType)
        Starts a new MeshPart. The mesh part is not usable until end() is called. This will reset the current color and vertex transformation.
        See Also:
        part(String, int, MeshPart)
      • part

        public MeshPart part​(java.lang.String id,
                             int primitiveType,
                             MeshPart meshPart)
        Starts a new MeshPart. The mesh part is not usable until end() is called. This will reset the current color and vertex transformation.
        Parameters:
        id - The id (name) of the part
        primitiveType - e.g. GL20.GL_TRIANGLES or GL20.GL_LINES
        meshPart - The part to receive the result
      • end

        public Mesh end​(Mesh mesh)
        End building the mesh and returns the mesh
        Parameters:
        mesh - The mesh to receive the built vertices and indices, must have the same attributes and must be big enough to hold the data, any existing data will be overwritten.
      • end

        public Mesh end()
        End building the mesh and returns the mesh
      • clear

        public void clear()
        Clears the data being built up until now, including the vertices, indices and all parts. Must be called in between the call to #begin and #end. Any builder calls made from the last call to #begin up until now are practically discarded. The state (e.g. UV region, color, vertex transform) will remain unchanged.
      • getFloatsPerVertex

        public int getFloatsPerVertex()
        Returns:
        the size in number of floats of one vertex, multiply by four to get the size in bytes.
      • getNumVertices

        public int getNumVertices()
        Returns:
        The number of vertices built up until now, only valid in between the call to begin() and end().
      • getVertices

        public void getVertices​(float[] out,
                                int destOffset)
        Get a copy of the vertices built so far.
        Parameters:
        out - The float array to receive the copy of the vertices, must be at least `destOffset` + getNumVertices() * getFloatsPerVertex() in size.
        destOffset - The offset (number of floats) in the out array where to start copying
      • getVertices

        protected float[] getVertices()
        Provides direct access to the vertices array being built, use with care. The size of the array might be bigger, do not rely on the length of the array. Instead use getFloatsPerVertex() * getNumVertices() to calculate the usable size of the array. Must be called in between the call to #begin and #end.
      • getNumIndices

        public int getNumIndices()
        Returns:
        The number of indices built up until now, only valid in between the call to begin() and end().
      • getIndices

        public void getIndices​(short[] out,
                               int destOffset)
        Get a copy of the indices built so far.
        Parameters:
        out - The short array to receive the copy of the indices, must be at least `destOffset` + getNumIndices() in size.
        destOffset - The offset (number of shorts) in the out array where to start copying
      • getIndices

        protected short[] getIndices()
        Provides direct access to the indices array being built, use with care. The size of the array might be bigger, do not rely on the length of the array. Instead use getNumIndices() to calculate the usable size of the array. Must be called in between the call to #begin and #end.
      • setUVRange

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

        public void ensureVertices​(int numVertices)
        Description copied from interface: MeshPartBuilder
        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.
        Specified by:
        ensureVertices in interface MeshPartBuilder
        Parameters:
        numVertices - The number of vertices you are about to add
      • ensureIndices

        public void ensureIndices​(int numIndices)
        Description copied from interface: MeshPartBuilder
        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.
        Specified by:
        ensureIndices in interface MeshPartBuilder
        Parameters:
        numIndices - The number of indices you are about to add
      • ensureCapacity

        public void ensureCapacity​(int numVertices,
                                   int numIndices)
        Description copied from interface: MeshPartBuilder
        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.
        Specified by:
        ensureCapacity in interface MeshPartBuilder
        Parameters:
        numVertices - The number of vertices you are about to add
        numIndices - The number of indices you are about to add
      • ensureRectangleIndices

        public void ensureRectangleIndices​(int numRectangles)
        Description copied from interface: MeshPartBuilder
        Increases the size of the backing indices array to accommodate the specified number of additional rectangles. Useful before adding many rectangles using MeshPartBuilder.rect(short, short, short, short) to avoid multiple backing array resizes.
        Specified by:
        ensureRectangleIndices in interface MeshPartBuilder
        Parameters:
        numRectangles - The number of rectangles you are about to add
      • lastIndex

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

        public short vertex​(float... values)
        Description copied from interface: MeshPartBuilder
        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 MeshPartBuilder
      • index

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

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

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

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

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

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

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

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

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

        public void rect​(short corner00,
                         short corner10,
                         short corner11,
                         short corner01)
        Description copied from interface: MeshPartBuilder
        Add a rectangle by indices. Requires GL_POINTS, GL_LINES or GL_TRIANGLES primitive type.
        Specified by:
        rect in interface MeshPartBuilder
      • 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: MeshPartBuilder
        Add a rectangle Requires GL_POINTS, GL_LINES or GL_TRIANGLES primitive type.
        Specified by:
        rect in interface MeshPartBuilder
      • addMesh

        public void addMesh​(Mesh mesh)
        Description copied from interface: MeshPartBuilder
        Copies a mesh to the mesh (part) currently being build.
        Specified by:
        addMesh in interface MeshPartBuilder
        Parameters:
        mesh - The mesh to copy, must have the same vertex attributes and must be indexed.
      • addMesh

        public void addMesh​(MeshPart meshpart)
        Description copied from interface: MeshPartBuilder
        Copies a MeshPart to the mesh (part) currently being build.
        Specified by:
        addMesh in interface MeshPartBuilder
        Parameters:
        meshpart - The MeshPart to copy, must have the same vertex attributes, primitive type and must be indexed.
      • addMesh

        public void addMesh​(Mesh mesh,
                            int indexOffset,
                            int numIndices)
        Description copied from interface: MeshPartBuilder
        Copies a (part of a) mesh to the mesh (part) currently being build.
        Specified by:
        addMesh in interface MeshPartBuilder
        Parameters:
        mesh - The mesh to (partly) copy, must have the same vertex attributes and must be indexed.
        indexOffset - The zero-based offset of the first index of the part of the mesh to copy.
        numIndices - The number of indices of the part of the mesh to copy.
      • addMesh

        public void addMesh​(float[] vertices,
                            short[] indices,
                            int indexOffset,
                            int numIndices)
        Description copied from interface: MeshPartBuilder
        Copies a (part of a) mesh to the mesh (part) currently being build.
        Specified by:
        addMesh in interface MeshPartBuilder
        Parameters:
        vertices - The vertices to (partly) copy, must be in the same vertex layout as the mesh being build.
        indices - Array containing the indices to (partly) copy, each index should be valid in the vertices array.
        indexOffset - The zero-based offset of the first index of the part of indices array to copy.
        numIndices - The number of indices of the part of the indices array to copy.
      • addMesh

        public void addMesh​(float[] vertices,
                            short[] indices)
        Description copied from interface: MeshPartBuilder
        Copies a mesh to the mesh (part) currently being build. The entire vertices array is added, even if some of the vertices are not indexed by the indices array. If you want to add only the vertices that are actually indexed, then use the MeshPartBuilder.addMesh(float[], short[], int, int) method instead.
        Specified by:
        addMesh in interface MeshPartBuilder
        Parameters:
        vertices - The vertices to copy, must be in the same vertex layout as the mesh being build.
        indices - Array containing the indices to copy, each index should be valid in the vertices array.
      • patch

        @Deprecated
        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)
        Deprecated.
        Specified by:
        patch in interface MeshPartBuilder
      • box

        @Deprecated
        public void box​(float width,
                        float height,
                        float depth)
        Deprecated.
        Specified by:
        box in interface MeshPartBuilder
      • box

        @Deprecated
        public void box​(float x,
                        float y,
                        float z,
                        float width,
                        float height,
                        float depth)
        Deprecated.
        Specified by:
        box in interface MeshPartBuilder
      • circle

        @Deprecated
        public void circle​(float radius,
                           int divisions,
                           float centerX,
                           float centerY,
                           float centerZ,
                           float normalX,
                           float normalY,
                           float normalZ)
        Deprecated.
        Specified by:
        circle in interface MeshPartBuilder
      • circle

        @Deprecated
        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)
        Deprecated.
        Specified by:
        circle in interface MeshPartBuilder
      • circle

        @Deprecated
        public void circle​(float radius,
                           int divisions,
                           float centerX,
                           float centerY,
                           float centerZ,
                           float normalX,
                           float normalY,
                           float normalZ,
                           float angleFrom,
                           float angleTo)
        Deprecated.
        Specified by:
        circle in interface MeshPartBuilder
      • circle

        @Deprecated
        public void circle​(float radius,
                           int divisions,
                           Vector3 center,
                           Vector3 normal,
                           float angleFrom,
                           float angleTo)
        Deprecated.
        Specified by:
        circle in interface MeshPartBuilder
      • circle

        @Deprecated
        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)
        Deprecated.
        Specified by:
        circle in interface MeshPartBuilder
      • ellipse

        @Deprecated
        public void ellipse​(float width,
                            float height,
                            int divisions,
                            float centerX,
                            float centerY,
                            float centerZ,
                            float normalX,
                            float normalY,
                            float normalZ)
        Deprecated.
        Specified by:
        ellipse in interface MeshPartBuilder
      • ellipse

        @Deprecated
        public void ellipse​(float width,
                            float height,
                            int divisions,
                            Vector3 center,
                            Vector3 normal)
        Deprecated.
        Specified by:
        ellipse in interface MeshPartBuilder
      • ellipse

        @Deprecated
        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)
        Deprecated.
        Specified by:
        ellipse in interface MeshPartBuilder
      • ellipse

        @Deprecated
        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)
        Deprecated.
        Specified by:
        ellipse in interface MeshPartBuilder
      • ellipse

        @Deprecated
        public void ellipse​(float width,
                            float height,
                            int divisions,
                            Vector3 center,
                            Vector3 normal,
                            float angleFrom,
                            float angleTo)
        Deprecated.
        Specified by:
        ellipse in interface MeshPartBuilder
      • ellipse

        @Deprecated
        public void ellipse​(float width,
                            float height,
                            int divisions,
                            Vector3 center,
                            Vector3 normal,
                            Vector3 tangent,
                            Vector3 binormal,
                            float angleFrom,
                            float angleTo)
        Deprecated.
        Specified by:
        ellipse in interface MeshPartBuilder
      • ellipse

        @Deprecated
        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)
        Deprecated.
        Specified by:
        ellipse in interface MeshPartBuilder
      • ellipse

        @Deprecated
        public void ellipse​(float width,
                            float height,
                            float innerWidth,
                            float innerHeight,
                            int divisions,
                            Vector3 center,
                            Vector3 normal)
        Deprecated.
        Specified by:
        ellipse in interface MeshPartBuilder
      • ellipse

        @Deprecated
        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)
        Deprecated.
        Specified by:
        ellipse in interface MeshPartBuilder
      • ellipse

        @Deprecated
        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)
        Deprecated.
        Specified by:
        ellipse in interface MeshPartBuilder
      • ellipse

        @Deprecated
        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)
        Deprecated.
        Specified by:
        ellipse in interface MeshPartBuilder
      • cylinder

        @Deprecated
        public void cylinder​(float width,
                             float height,
                             float depth,
                             int divisions)
        Deprecated.
        Specified by:
        cylinder in interface MeshPartBuilder
      • cylinder

        @Deprecated
        public void cylinder​(float width,
                             float height,
                             float depth,
                             int divisions,
                             float angleFrom,
                             float angleTo)
        Deprecated.
        Specified by:
        cylinder in interface MeshPartBuilder
      • cylinder

        @Deprecated
        public void cylinder​(float width,
                             float height,
                             float depth,
                             int divisions,
                             float angleFrom,
                             float angleTo,
                             boolean close)
        Deprecated.
        Specified by:
        cylinder in interface MeshPartBuilder
      • cone

        @Deprecated
        public void cone​(float width,
                         float height,
                         float depth,
                         int divisions)
        Deprecated.
        Specified by:
        cone in interface MeshPartBuilder
      • cone

        @Deprecated
        public void cone​(float width,
                         float height,
                         float depth,
                         int divisions,
                         float angleFrom,
                         float angleTo)
        Deprecated.
        Specified by:
        cone in interface MeshPartBuilder
      • sphere

        @Deprecated
        public void sphere​(float width,
                           float height,
                           float depth,
                           int divisionsU,
                           int divisionsV)
        Deprecated.
        Specified by:
        sphere in interface MeshPartBuilder
      • sphere

        @Deprecated
        public void sphere​(Matrix4 transform,
                           float width,
                           float height,
                           float depth,
                           int divisionsU,
                           int divisionsV)
        Deprecated.
        Specified by:
        sphere in interface MeshPartBuilder
      • sphere

        @Deprecated
        public void sphere​(float width,
                           float height,
                           float depth,
                           int divisionsU,
                           int divisionsV,
                           float angleUFrom,
                           float angleUTo,
                           float angleVFrom,
                           float angleVTo)
        Deprecated.
        Specified by:
        sphere in interface MeshPartBuilder
      • sphere

        @Deprecated
        public void sphere​(Matrix4 transform,
                           float width,
                           float height,
                           float depth,
                           int divisionsU,
                           int divisionsV,
                           float angleUFrom,
                           float angleUTo,
                           float angleVFrom,
                           float angleVTo)
        Deprecated.
        Specified by:
        sphere in interface MeshPartBuilder
      • capsule

        @Deprecated
        public void capsule​(float radius,
                            float height,
                            int divisions)
        Deprecated.
        Specified by:
        capsule in interface MeshPartBuilder
      • arrow

        @Deprecated
        public void arrow​(float x1,
                          float y1,
                          float z1,
                          float x2,
                          float y2,
                          float z2,
                          float capLength,
                          float stemThickness,
                          int divisions)
        Deprecated.
        Specified by:
        arrow in interface MeshPartBuilder