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().
| Modifier and Type | Field and Description |
|---|---|
| protected VertexAttributes | attributes
The vertex attributes of the resulting mesh |
| protected int | biNorOffset
The offset within a vertex to binormal, or -1 if not available |
| protected final BoundingBox | |
| protected int | colOffset
The offset within an vertex to color, or -1 if not available |
| protected final Color | color
The color used if no vertex color is specified. |
| protected int | colSize
The size (in number of floats) of the color attribute |
| protected int | cpOffset
The offset within an vertex to packed color, or -1 if not available |
| protected boolean | |
| protected boolean | |
| protected ShortArray | indices
The indices to construct, no size checking is done |
| private static IntIntMap | |
| protected int | istart
The offset in the indices array when begin() was called, used to define a meshpart. |
| private int | |
| public static final int | MAX_INDEX
highest index mesh builder can get (64k - 1) |
| public static final int | MAX_VERTICES
maximum number of vertices mesh builder can hold (64k) |
| protected final Matrix3 | |
| protected int | norOffset
The offset within an vertex to normal, or -1 if not available |
| protected MeshPart | part
The meshpart currently being created |
| protected Array | parts
The parts created between begin and end |
| protected final Matrix4 | |
| protected int | posOffset
The offset within an vertex to position |
| protected int | posSize
The size (in number of floats) of the position attribute |
| protected int | primitiveType
The current primitiveType |
| protected int | stride
The size (in number of floats) of each vertex |
| protected int | tangentOffset
The offset within a vertex to tangent, or -1 if not available |
| protected final Color | |
| protected static final ShortArray | |
| private final Vector3 | |
| protected static final FloatArray | |
| protected float | uOffset
The UV range used when building |
| protected float | uScale
The UV range used when building |
| protected int | uvOffset
The offset within an vertex to texture coordinates, or -1 if not available |
| protected float[] | |
| protected boolean | |
| protected FloatArray | vertices
The vertices to construct, no size checking is done |
| protected final MeshPartBuilder. | |
| protected final MeshPartBuilder. | |
| protected final MeshPartBuilder. | |
| protected final MeshPartBuilder. | |
| protected int | vindex
The current vertex index, used for indexing |
| protected float | vOffset
The UV range used when building |
| protected float | vScale
The UV range used when building |
| private static final Vector3 |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | addMesh(Mesh mesh)
Implements com. Copies a mesh to the mesh (part) currently being build. |
| public void | addMesh(MeshPart meshpart)
Implements com. Copies a MeshPart to the mesh (part) currently being build. |
| public void | addMesh(Mesh mesh, int indexOffset, int numIndices)
Implements com. Copies a (part of a) mesh to the mesh (part) currently being build. |
| public void | addMesh(float[] vertices, short[] indices, int indexOffset, int numIndices)
Implements com. Copies a (part of a) mesh to the mesh (part) currently being build. |
| public void | addMesh(float[] vertices, short[] indices)
Implements com. Copies a mesh to the mesh (part) currently being build. |
| private final void | |
| public void | arrow(float x1, float y1, float z1, float x2, float y2, float z2, float capLength, float stemThickness, int divisions)
Implements com.
Deprecated
|
| public void | begin(final long
bitwise mask of the attributes)com., only Position, Color, Normal
and TextureCoordinates is supported.Begin building a mesh. |
| public void | |
| public void | begin(final long
bitwise mask of the attributes, int primitiveType)com., only Position, Color, Normal
and TextureCoordinates is supported.Begin building a mesh. |
| public void | |
| public void | box(MeshPartBuilder.
Implements com.
Deprecated
|
| public void | |
| public void | box(Matrix4 transform)
Implements com.
Deprecated
|
| public void | box(float width, float height, float depth)
Implements com.
Deprecated
|
| public void | box(float x, float y, float z, float width, float height, float depth)
Implements com.
Deprecated
|
| public void | capsule(float radius, float height, int divisions)
Implements com.
Deprecated
|
| public void | circle(float radius, int divisions, float centerX, float centerY, float centerZ, float normalX, float normalY, float normalZ)
Implements com.
Deprecated
|
| public void | circle(float radius, int divisions, final Vector3 center, final Vector3 normal)
Implements com.
Deprecated
|
| public void | |
| 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)
Implements com.
Deprecated
|
| public void | circle(float radius, int divisions, float centerX, float centerY, float centerZ, float normalX, float normalY, float normalZ, float angleFrom, float angleTo)
Implements com.
Deprecated
|
| public void | circle(float radius, int divisions, final Vector3 center, final Vector3 normal, float angleFrom, float angleTo)
Implements com.
Deprecated
|
| public void | |
| 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)
Implements com.
Deprecated
|
| public void | |
| public void | cone(float width, float height, float depth, int divisions)
Implements com.
Deprecated
|
| public void | cone(float width, float height, float depth, int divisions, float angleFrom, float angleTo)
Implements com.
Deprecated
|
| public static VertexAttributes | createAttributes(long
bitwise mask of the usage)com., only Position, Color, Normal and
TextureCoordinates is supported.
|
| public void | cylinder(float width, float height, float depth, int divisions)
Implements com.
Deprecated
|
| public void | cylinder(float width, float height, float depth, int divisions, float angleFrom, float angleTo)
Implements com.
Deprecated
|
| public void | cylinder(float width, float height, float depth, int divisions, float angleFrom, float angleTo, boolean close)
Implements com.
Deprecated
|
| public void | ellipse(float width, float height, int divisions, float centerX, float centerY, float centerZ, float normalX, float normalY, float normalZ)
Implements com.
Deprecated
|
| public void | ellipse(float width, float height, int divisions, final Vector3 center, final Vector3 normal)
Implements com.
Deprecated
|
| public void | |
| 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)
Implements com.
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)
Implements com.
Deprecated
|
| public void | ellipse(float width, float height, int divisions, final Vector3 center, final Vector3 normal, float angleFrom, float angleTo)
Implements com.
Deprecated
|
| public void | |
| 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)
Implements com.
Deprecated
|
| public void | ellipse(float width, float height, float innerWidth, float innerHeight, int divisions, Vector3 center, Vector3 normal)
Implements com.
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)
Implements com.
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)
Implements com.
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)
Implements com.
Deprecated
|
| public Mesh | |
| public Mesh | |
| private void | |
| public void | ensureCapacity(int numVertices, int numIndices)
Implements com. Increases the size of the backing vertices and indices arrays to accommodate the specified number of additional vertices and indices. |
| public void | ensureIndices(int numIndices)
Implements com. Increases the size of the backing indices array to accommodate the specified number of additional indices. |
| public void | ensureRectangleIndices(int numRectangles)
Implements com. Increases the size of the backing indices array to accommodate the specified number of additional rectangles. |
| public void | ensureRectangles(int numVertices, int numRectangles)
Deprecated
use
ensureVertices(int) followed by ensureRectangleIndices(int) instead.
|
| public void | ensureRectangles(int numRectangles)
Deprecated
use
ensureVertices(int) followed by ensureRectangleIndices(int) instead.
|
| public void | ensureTriangleIndices(int numTriangles)
Implements com. Increases the size of the backing indices array to accommodate the specified number of additional triangles. |
| public void | ensureTriangles(int numVertices, int numTriangles)
Deprecated
use
ensureVertices(int) followed by ensureTriangleIndices(int) instead.
|
| public void | ensureTriangles(int numTriangles)
Deprecated
use
ensureVertices(int) followed by ensureTriangleIndices(int) instead.
|
| public void | ensureVertices(int numVertices)
Implements com. Increases the size of the backing vertices array to accommodate the specified number of additional vertices. |
| public VertexAttributes | |
| public int | getFloatsPerVertex()
Returns: the size in number of floats of one vertex, multiply by four to get the size in bytes. |
| public void | getIndices(short[]
The short array to receive the copy of the indices, must be at least `destOffset` + out, int getNumIndices() in
size.The offset (number of shorts) in the out array where to start copying destOffset)Get a copy of the indices built so far. |
| protected short[] | |
| public MeshPart | |
| public int | getNumIndices()
Returns: The number of indices built up until now, only valid in between the call to begin() and end(). |
| public int | getNumVertices()
Returns: The number of vertices built up until now, only valid in between the call to begin() and end(). |
| public int | |
| public Matrix4 | getVertexTransform(Matrix4 out)
Implements com. Get the current vertex transformation matrix. |
| public void | getVertices(float[]
The float array to receive the copy of the vertices, must be at least `destOffset` + out, int getNumVertices() *
getFloatsPerVertex() in size.The offset (number of floats) in the out array where to start copying destOffset)Get a copy of the vertices built so far. |
| protected float[] | |
| public void | index(final short value)
Implements com. Add an index, MeshPartBuilder expects all meshes to be indexed. |
| public void | index(final short value1, final short value2)
Implements com. Add multiple indices, MeshPartBuilder expects all meshes to be indexed. |
| public void | index(final short value1, final short value2, final short value3)
Implements com. Add multiple indices, MeshPartBuilder expects all meshes to be indexed. |
| public void | index(final short value1, final short value2, final short value3, final short value4)
Implements com. Add multiple indices, MeshPartBuilder expects all meshes to be indexed. |
| public void | index(short value1, short value2, short value3, short value4, short value5, short value6)
Implements com. Add multiple indices, MeshPartBuilder expects all meshes to be indexed. |
| public void | index(short value1, short value2, short value3, short value4, short value5, short value6, short value7, short value8)
Implements com. Add multiple indices, MeshPartBuilder expects all meshes to be indexed. |
| public boolean | isVertexTransformationEnabled()
Implements com. Indicates whether vertex transformation is enabled. |
| public int | |
| public void | line(short index1, short index2)
Implements com. Add a line by indices. |
| public void | line(MeshPartBuilder.
Implements com. Add a line. |
| public void | line(Vector3 p1, Vector3 p2)
Implements com. Add a line. |
| public void | line(float x1, float y1, float z1, float x2, float y2, float z2)
Implements com. Add a line. |
| public void | |
| public MeshPart | |
| public MeshPart | part(final String
The id (name) of the part id, final int e.g. primitiveType, MeshPart GL20#GL_TRIANGLES or GL20#GL_LINESThe part to receive the result meshPart)Starts a new MeshPart. |
| public void | patch(MeshPartBuilder.
Implements com.
Deprecated
|
| public void | |
| 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)
Implements com.
Deprecated
|
| public void | rect(short corner00, short corner10, short corner11, short corner01)
Implements com. Add a rectangle by indices. |
| public void | rect(MeshPartBuilder.
Implements com. Add a rectangle. |
| public void | |
| 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)
Implements com. Add a rectangle Requires GL_POINTS, GL_LINES or GL_TRIANGLES primitive type. |
| public void | setColor(float r, float g, float b, float a)
Implements com. Set the color used to tint the vertex color, defaults to white. |
| public void | setColor(final Color color)
Implements com. Set the color used to tint the vertex color, defaults to white. |
| public void | setUVRange(float u1, float v1, float u2, float v2)
Implements com. Set range of texture coordinates used (default is 0,0,1,1). |
| public void | setUVRange(TextureRegion region)
Implements com. Set range of texture coordinates from the specified TextureRegion. |
| public void | setVertexTransform(Matrix4 transform)
Implements com. Set the current vertex transformation matrix and enables vertex transformation. |
| public void | setVertexTransformationEnabled(boolean enabled)
Implements com. Sets whether vertex transformation is enabled. |
| public void | sphere(float width, float height, float depth, int divisionsU, int divisionsV)
Implements com.
Deprecated
|
| public void | sphere(final Matrix4 transform, float width, float height, float depth, int divisionsU, int divisionsV)
Implements com.
Deprecated
|
| public void | sphere(float width, float height, float depth, int divisionsU, int divisionsV, float angleUFrom, float angleUTo, float angleVFrom, float angleVTo)
Implements com.
Deprecated
|
| public void | sphere(final Matrix4 transform, float width, float height, float depth, int divisionsU, int divisionsV, float angleUFrom, float angleUTo, float angleVFrom, float angleVTo)
Implements com.
Deprecated
|
| private static final void | |
| private static final void | |
| public void | triangle(short index1, short index2, short index3)
Implements com. Add a triangle by indices. |
| public void | triangle(MeshPartBuilder.
Implements com. Add a triangle. |
| public void | triangle(Vector3 p1, Vector3 p2, Vector3 p3)
Implements com. Add a triangle. |
| public void | |
| public short | |
| public short | vertex(final float... values)
Implements com. Add one or more vertices, returns the index of the last vertex added. |
| public short | vertex(final MeshPartBuilder.
Implements com. Add a vertex, returns the index. |