Package gaiasky.util.gdx
Class IntIntMeshBuilder
java.lang.Object
gaiasky.util.gdx.IntIntMeshBuilder
- All Implemented Interfaces:
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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
arrow(float x1, float y1, float z1, float x2, float y2, float z2, float capLength, float stemThickness, int divisions)
Add an arrowvoid
begin(long attributes)
Begin building a mesh.void
begin(long attributes, int primitiveType)
Begin building a mesh.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 meshvoid
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 dimensionsvoid
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
box(IntMeshPartBuilder.VertexInfo corner000, IntMeshPartBuilder.VertexInfo corner010, IntMeshPartBuilder.VertexInfo corner100, IntMeshPartBuilder.VertexInfo corner110, IntMeshPartBuilder.VertexInfo corner001, IntMeshPartBuilder.VertexInfo corner011, IntMeshPartBuilder.VertexInfo corner101, IntMeshPartBuilder.VertexInfo corner111)
Add a box.void
capsule(float radius, float height, int divisions)
Add a capsulevoid
circle(float radius, int divisions, float centerX, float centerY, float centerZ, float normalX, float normalY, float normalZ)
Add a circlevoid
circle(float radius, int divisions, float centerX, float centerY, float centerZ, float normalX, float normalY, float normalZ, float angleFrom, float angleTo)
Add a circlevoid
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 circlevoid
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 circlevoid
circle(float radius, int divisions, com.badlogic.gdx.math.Vector3 center, com.badlogic.gdx.math.Vector3 normal)
Add a circlevoid
circle(float radius, int divisions, com.badlogic.gdx.math.Vector3 center, com.badlogic.gdx.math.Vector3 normal, float angleFrom, float angleTo)
Add a circlevoid
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 circlevoid
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 circlevoid
cone(float width, float height, float depth, int divisions)
Add a conevoid
cone(float width, float height, float depth, int divisions, float angleFrom, float angleTo)
Add a conevoid
cone(float width, float height, float depth, int divisions, int hdivisions, float angleFrom, float angleTo)
Add a conestatic com.badlogic.gdx.graphics.VertexAttributes
createAttributes(long usage)
void
cylinder(float width, float height, float depth, int divisions)
Add a cylindervoid
cylinder(float width, float height, float depth, int divisions, float angleFrom, float angleTo)
Add a cylindervoid
cylinder(float width, float height, float depth, int divisions, float angleFrom, float angleTo, boolean close)
Add a cylindervoid
cylinder(float width, float height, float depth, int divisions, float angleFrom, float angleTo, boolean close, boolean flipNormals)
Add a cylindervoid
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 ellipsevoid
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 ellipsevoid
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 ellipsevoid
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 ellipsevoid
ellipse(float width, float height, int divisions, float centerX, float centerY, float centerZ, float normalX, float normalY, float normalZ)
Add a circlevoid
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 circlevoid
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 circlevoid
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 circlevoid
ellipse(float width, float height, int divisions, com.badlogic.gdx.math.Vector3 center, com.badlogic.gdx.math.Vector3 normal)
Add a circlevoid
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 circlevoid
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 circlevoid
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 circleend()
End building the mesh and returns the meshvoid
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 icospherevoid
icosphere(float radius, int divisions, boolean flipNormals, boolean hardEdges, int startFace, int nfaces)
Add an icospherevoid
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 octahedronspherevoid
octahedronsphere(float radius, int divisions, boolean flipNormals, boolean hardEdges, int startFace, int nfaces)
Add an octahedronsphereStarts 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
rect(IntMeshPartBuilder.VertexInfo corner00, IntMeshPartBuilder.VertexInfo corner10, IntMeshPartBuilder.VertexInfo corner11, IntMeshPartBuilder.VertexInfo corner01)
Add a rectangle.void
ring(float innerRadius, float outerRadius, int divisions, boolean flipNormals)
Add a ringvoid
ring(com.badlogic.gdx.math.Matrix4 transform, float innerRadius, float outerRadius, int divisions, boolean flipNormals)
Add a ringvoid
ring(com.badlogic.gdx.math.Matrix4 transform, float innerRadius, float outerRadius, int divisions, boolean flipNormals, float angleStart, float angleEnd)
Add a ringvoid
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
setVertexTransformationEnabled(boolean enabled)
Sets whether vertex transformation is enabled.void
sphere(float width, float height, float depth, int divisionsU, int divisionsV)
Add a spherevoid
sphere(float width, float height, float depth, int divisionsU, int divisionsV, boolean flipNormals, float angleUFrom, float angleUTo, float angleVFrom, float angleVTo)
Add a spherevoid
sphere(float width, float height, float depth, int divisionsU, int divisionsV, float angleUFrom, float angleUTo, float angleVFrom, float angleVTo)
Add a spherevoid
sphere(com.badlogic.gdx.math.Matrix4 transform, float width, float height, float depth, int divisionsU, int divisionsV)
Add a spherevoid
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 spherevoid
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 spherevoid
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
triangle(IntMeshPartBuilder.VertexInfo p1, IntMeshPartBuilder.VertexInfo p2, IntMeshPartBuilder.VertexInfo p3)
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.
-
Constructor Details
-
IntIntMeshBuilder
public IntIntMeshBuilder()
-
-
Method Details
-
createAttributes
public static com.badlogic.gdx.graphics.VertexAttributes createAttributes(long usage)- Parameters:
usage
- bitwise mask of theVertexAttributes.Usage
, only Position, Color, Normal and TextureCoordinates is supported.
-
begin
public void begin(long attributes)Begin building a mesh. Callpart(String, int)
to start aIntMeshPart
.- Parameters:
attributes
- bitwise mask of theVertexAttributes.Usage
, only Position, Color, Normal and TextureCoordinates is supported.
-
begin
public void begin(com.badlogic.gdx.graphics.VertexAttributes attributes)Begin building a mesh. Callpart(String, int)
to start aIntMeshPart
. -
begin
public void begin(long attributes, int primitiveType)Begin building a mesh.- Parameters:
attributes
- bitwise mask of theVertexAttributes.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
Starts a new MeshPart. The mesh part is not usable until end() is called -
end
End building the mesh and returns the mesh -
getAttributes
public com.badlogic.gdx.graphics.VertexAttributes getAttributes()- Specified by:
getAttributes
in interfaceIntMeshPartBuilder
- Returns:
- The
VertexAttributes
available for building.
-
getMeshPart
- Specified by:
getMeshPart
in interfaceIntMeshPartBuilder
- 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 interfaceIntMeshPartBuilder
-
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 interfaceIntMeshPartBuilder
-
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 interfaceIntMeshPartBuilder
-
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 interfaceIntMeshPartBuilder
-
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 addnumIndices
- 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 addnumTriangles
- 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 addnumRectangles
- 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 interfaceIntMeshPartBuilder
- 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. UseIntMeshPartBuilder.getAttributes()
to check which values are available.- Specified by:
vertex
in interfaceIntMeshPartBuilder
-
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 interfaceIntMeshPartBuilder
-
vertex
Description copied from interface:IntMeshPartBuilder
Add a vertex, returns the index. UseIntMeshPartBuilder.getAttributes()
to check which values are available.- Specified by:
vertex
in interfaceIntMeshPartBuilder
-
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 interfaceIntMeshPartBuilder
-
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 interfaceIntMeshPartBuilder
-
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 interfaceIntMeshPartBuilder
-
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 interfaceIntMeshPartBuilder
-
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 interfaceIntMeshPartBuilder
-
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 interfaceIntMeshPartBuilder
-
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 interfaceIntMeshPartBuilder
-
line
Description copied from interface:IntMeshPartBuilder
Add a line. Requires GL_LINES primitive type.- Specified by:
line
in interfaceIntMeshPartBuilder
-
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 interfaceIntMeshPartBuilder
-
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 interfaceIntMeshPartBuilder
-
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 interfaceIntMeshPartBuilder
-
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 interfaceIntMeshPartBuilder
-
triangle
public void triangle(IntMeshPartBuilder.VertexInfo p1, IntMeshPartBuilder.VertexInfo p2, IntMeshPartBuilder.VertexInfo p3)Description copied from interface:IntMeshPartBuilder
Add a triangle. Requires GL_POINTS, GL_LINES or GL_TRIANGLES primitive type.- Specified by:
triangle
in interfaceIntMeshPartBuilder
-
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 interfaceIntMeshPartBuilder
-
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 interfaceIntMeshPartBuilder
-
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 interfaceIntMeshPartBuilder
-
rect
public void rect(IntMeshPartBuilder.VertexInfo corner00, IntMeshPartBuilder.VertexInfo corner10, IntMeshPartBuilder.VertexInfo corner11, IntMeshPartBuilder.VertexInfo corner01)Description copied from interface:IntMeshPartBuilder
Add a rectangle. Requires GL_POINTS, GL_LINES or GL_TRIANGLES primitive type.- Specified by:
rect
in interfaceIntMeshPartBuilder
-
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 interfaceIntMeshPartBuilder
-
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 interfaceIntMeshPartBuilder
-
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 interfaceIntMeshPartBuilder
-
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 interfaceIntMeshPartBuilder
-
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 interfaceIntMeshPartBuilder
-
box
public void box(IntMeshPartBuilder.VertexInfo corner000, IntMeshPartBuilder.VertexInfo corner010, IntMeshPartBuilder.VertexInfo corner100, IntMeshPartBuilder.VertexInfo corner110, IntMeshPartBuilder.VertexInfo corner001, IntMeshPartBuilder.VertexInfo corner011, IntMeshPartBuilder.VertexInfo corner101, IntMeshPartBuilder.VertexInfo corner111)Description copied from interface:IntMeshPartBuilder
Add a box. Requires GL_POINTS, GL_LINES or GL_TRIANGLES primitive type.- Specified by:
box
in interfaceIntMeshPartBuilder
-
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 interfaceIntMeshPartBuilder
-
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 interfaceIntMeshPartBuilder
-
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 interfaceIntMeshPartBuilder
-
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 interfaceIntMeshPartBuilder
-
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 interfaceIntMeshPartBuilder
-
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 interfaceIntMeshPartBuilder
-
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 interfaceIntMeshPartBuilder
-
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 interfaceIntMeshPartBuilder
-
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 interfaceIntMeshPartBuilder
-
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 interfaceIntMeshPartBuilder
-
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 interfaceIntMeshPartBuilder
-
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 interfaceIntMeshPartBuilder
-
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 interfaceIntMeshPartBuilder
-
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 interfaceIntMeshPartBuilder
-
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 interfaceIntMeshPartBuilder
-
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 interfaceIntMeshPartBuilder
-
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 interfaceIntMeshPartBuilder
-
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 interfaceIntMeshPartBuilder
-
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 interfaceIntMeshPartBuilder
-
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 interfaceIntMeshPartBuilder
-
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 interfaceIntMeshPartBuilder
-
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 interfaceIntMeshPartBuilder
-
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 interfaceIntMeshPartBuilder
-
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 interfaceIntMeshPartBuilder
-
cylinder
public void cylinder(float width, float height, float depth, int divisions)Description copied from interface:IntMeshPartBuilder
Add a cylinder- Specified by:
cylinder
in interfaceIntMeshPartBuilder
-
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 interfaceIntMeshPartBuilder
-
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 interfaceIntMeshPartBuilder
-
cone
public void cone(float width, float height, float depth, int divisions)Description copied from interface:IntMeshPartBuilder
Add a cone- Specified by:
cone
in interfaceIntMeshPartBuilder
-
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 interfaceIntMeshPartBuilder
-
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 interfaceIntMeshPartBuilder
-
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 interfaceIntMeshPartBuilder
-
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 interfaceIntMeshPartBuilder
-
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 interfaceIntMeshPartBuilder
-
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 interfaceIntMeshPartBuilder
-
capsule
public void capsule(float radius, float height, int divisions)Description copied from interface:IntMeshPartBuilder
Add a capsule- Specified by:
capsule
in interfaceIntMeshPartBuilder
-
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 interfaceIntMeshPartBuilder
- Parameters:
x1
- source xy1
- source yz1
- source zx2
- destination xy2
- destination yz2
- destination zcapLength
- 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 interfaceIntMeshPartBuilder
-
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 interfaceIntMeshPartBuilder
-
isVertexTransformationEnabled
public boolean isVertexTransformationEnabled()Description copied from interface:IntMeshPartBuilder
Indicates whether vertex transformation is enabled.- Specified by:
isVertexTransformationEnabled
in interfaceIntMeshPartBuilder
-
setVertexTransformationEnabled
public void setVertexTransformationEnabled(boolean enabled)Description copied from interface:IntMeshPartBuilder
Sets whether vertex transformation is enabled.- Specified by:
setVertexTransformationEnabled
in interfaceIntMeshPartBuilder
-
icosphere
public void icosphere(float radius, int divisions, boolean flipNormals, boolean hardEdges)Description copied from interface:IntMeshPartBuilder
Add an icosphere- Specified by:
icosphere
in interfaceIntMeshPartBuilder
-
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 interfaceIntMeshPartBuilder
-
octahedronsphere
public void octahedronsphere(float radius, int divisions, boolean flipNormals, boolean hardEdges)Description copied from interface:IntMeshPartBuilder
Add an octahedronsphere- Specified by:
octahedronsphere
in interfaceIntMeshPartBuilder
-
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 interfaceIntMeshPartBuilder
-
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 interfaceIntMeshPartBuilder
-
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 interfaceIntMeshPartBuilder
-
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 interfaceIntMeshPartBuilder
-
ring
public void ring(float innerRadius, float outerRadius, int divisions, boolean flipNormals)Description copied from interface:IntMeshPartBuilder
Add a ring- Specified by:
ring
in interfaceIntMeshPartBuilder
-
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 interfaceIntMeshPartBuilder
-
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 interfaceIntMeshPartBuilder
-