public class MeshBuilder extends Object implements MeshPartBuilder
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()
.MeshPartBuilder.VertexInfo
Constructor and Description |
---|
MeshBuilder() |
Modifier and Type | Method and Description |
---|---|
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 |
addMesh(MeshPart meshpart)
Copies a MeshPart 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)
Add an arrow
|
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)
Add a box with the specified dimensions.
|
void |
box(float x,
float y,
float z,
float width,
float height,
float depth)
Add a box at the specified location, with the specified dimensions
|
void |
box(Matrix4 transform)
Add a box given the matrix.
|
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)
Add a box.
|
void |
box(Vector3 corner000,
Vector3 corner010,
Vector3 corner100,
Vector3 corner110,
Vector3 corner001,
Vector3 corner011,
Vector3 corner101,
Vector3 corner111)
Add a box.
|
void |
capsule(float radius,
float height,
int divisions)
Add a capsule
|
void |
circle(float radius,
int divisions,
float centerX,
float centerY,
float centerZ,
float normalX,
float normalY,
float normalZ)
Add a circle
|
void |
circle(float radius,
int divisions,
float centerX,
float centerY,
float centerZ,
float normalX,
float normalY,
float normalZ,
float angleFrom,
float angleTo)
Add a circle
|
void |
circle(float radius,
int divisions,
float centerX,
float centerY,
float centerZ,
float normalX,
float normalY,
float normalZ,
float tangentX,
float tangentY,
float tangentZ,
float binormalX,
float binormalY,
float binormalZ)
Add a circle
|
void |
circle(float radius,
int divisions,
float centerX,
float centerY,
float centerZ,
float normalX,
float normalY,
float normalZ,
float tangentX,
float tangentY,
float tangentZ,
float binormalX,
float binormalY,
float binormalZ,
float angleFrom,
float angleTo)
Add a circle
|
void |
circle(float radius,
int divisions,
Vector3 center,
Vector3 normal)
Add a circle
|
void |
circle(float radius,
int divisions,
Vector3 center,
Vector3 normal,
float angleFrom,
float angleTo)
Add a circle
|
void |
circle(float radius,
int divisions,
Vector3 center,
Vector3 normal,
Vector3 tangent,
Vector3 binormal)
Add a circle
|
void |
circle(float radius,
int divisions,
Vector3 center,
Vector3 normal,
Vector3 tangent,
Vector3 binormal,
float angleFrom,
float angleTo)
Add a circle
|
void |
cone(float width,
float height,
float depth,
int divisions)
Add a cone
|
void |
cone(float width,
float height,
float depth,
int divisions,
float angleFrom,
float angleTo)
Add a cone
|
static VertexAttributes |
createAttributes(long usage) |
void |
cylinder(float width,
float height,
float depth,
int divisions)
Add a cylinder
|
void |
cylinder(float width,
float height,
float depth,
int divisions,
float angleFrom,
float angleTo)
Add a cylinder
|
void |
cylinder(float width,
float height,
float depth,
int divisions,
float angleFrom,
float angleTo,
boolean close)
Add a cylinder
|
void |
ellipse(float width,
float height,
float innerWidth,
float innerHeight,
int divisions,
float centerX,
float centerY,
float centerZ,
float normalX,
float normalY,
float normalZ)
Add an ellipse
|
void |
ellipse(float width,
float height,
float innerWidth,
float innerHeight,
int divisions,
float centerX,
float centerY,
float centerZ,
float normalX,
float normalY,
float normalZ,
float angleFrom,
float angleTo)
Add an ellipse
|
void |
ellipse(float width,
float height,
float innerWidth,
float innerHeight,
int divisions,
float centerX,
float centerY,
float centerZ,
float normalX,
float normalY,
float normalZ,
float tangentX,
float tangentY,
float tangentZ,
float binormalX,
float binormalY,
float binormalZ,
float angleFrom,
float angleTo)
Add an ellipse
|
void |
ellipse(float width,
float height,
float innerWidth,
float innerHeight,
int divisions,
Vector3 center,
Vector3 normal)
Add an ellipse
|
void |
ellipse(float width,
float height,
int divisions,
float centerX,
float centerY,
float centerZ,
float normalX,
float normalY,
float normalZ)
Add a circle
|
void |
ellipse(float width,
float height,
int divisions,
float centerX,
float centerY,
float centerZ,
float normalX,
float normalY,
float normalZ,
float angleFrom,
float angleTo)
Add a circle
|
void |
ellipse(float width,
float height,
int divisions,
float centerX,
float centerY,
float centerZ,
float normalX,
float normalY,
float normalZ,
float tangentX,
float tangentY,
float tangentZ,
float binormalX,
float binormalY,
float binormalZ)
Add a circle
|
void |
ellipse(float width,
float height,
int divisions,
float centerX,
float centerY,
float centerZ,
float normalX,
float normalY,
float normalZ,
float tangentX,
float tangentY,
float tangentZ,
float binormalX,
float binormalY,
float binormalZ,
float angleFrom,
float angleTo)
Add a circle
|
void |
ellipse(float width,
float height,
int divisions,
Vector3 center,
Vector3 normal)
Add a circle
|
void |
ellipse(float width,
float height,
int divisions,
Vector3 center,
Vector3 normal,
float angleFrom,
float angleTo)
Add a circle
|
void |
ellipse(float width,
float height,
int divisions,
Vector3 center,
Vector3 normal,
Vector3 tangent,
Vector3 binormal)
Add a circle
|
void |
ellipse(float width,
float height,
int divisions,
Vector3 center,
Vector3 normal,
Vector3 tangent,
Vector3 binormal,
float angleFrom,
float angleTo)
Add a circle
|
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)
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.
|
VertexAttributes |
getAttributes() |
MeshPart |
getMeshPart() |
int |
getNumIndices() |
int |
getNumVertices() |
Matrix4 |
getVertexTransform(Matrix4 out)
Get the current vertex transformation matrix.
|
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.
|
short |
lastIndex() |
void |
line(float x1,
float y1,
float z1,
float x2,
float y2,
float z2)
Add a line.
|
void |
line(MeshPartBuilder.VertexInfo p1,
MeshPartBuilder.VertexInfo p2)
Add a line.
|
void |
line(short index1,
short index2)
Add a line by indices.
|
void |
line(Vector3 p1,
Color c1,
Vector3 p2,
Color c2)
Add a line.
|
void |
line(Vector3 p1,
Vector3 p2)
Add a line.
|
MeshPart |
part(String id,
int primitiveType)
Starts a new MeshPart.
|
void |
patch(float x00,
float y00,
float z00,
float x10,
float y10,
float z10,
float x11,
float y11,
float z11,
float x01,
float y01,
float z01,
float normalX,
float normalY,
float normalZ,
int divisionsU,
int divisionsV)
Add a rectangle.
|
void |
patch(MeshPartBuilder.VertexInfo corner00,
MeshPartBuilder.VertexInfo corner10,
MeshPartBuilder.VertexInfo corner11,
MeshPartBuilder.VertexInfo corner01,
int divisionsU,
int divisionsV)
Add a rectangle.
|
void |
patch(Vector3 corner00,
Vector3 corner10,
Vector3 corner11,
Vector3 corner01,
Vector3 normal,
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(MeshPartBuilder.VertexInfo corner00,
MeshPartBuilder.VertexInfo corner10,
MeshPartBuilder.VertexInfo corner11,
MeshPartBuilder.VertexInfo corner01)
Add a rectangle.
|
void |
rect(short corner00,
short corner10,
short corner11,
short corner01)
Add a rectangle by indices.
|
void |
rect(Vector3 corner00,
Vector3 corner10,
Vector3 corner11,
Vector3 corner01,
Vector3 normal)
Add a rectangle.
|
void |
setColor(Color color)
Set the color used to tint the vertex color, defaults to white.
|
void |
setColor(float r,
float g,
float b,
float a)
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)
Add a sphere
|
void |
sphere(float width,
float height,
float depth,
int divisionsU,
int divisionsV,
float angleUFrom,
float angleUTo,
float angleVFrom,
float angleVTo)
Add a sphere
|
void |
sphere(Matrix4 transform,
float width,
float height,
float depth,
int divisionsU,
int divisionsV)
Add a sphere
|
void |
sphere(Matrix4 transform,
float width,
float height,
float depth,
int divisionsU,
int divisionsV,
float angleUFrom,
float angleUTo,
float angleVFrom,
float angleVTo)
Add a sphere
|
void |
triangle(MeshPartBuilder.VertexInfo p1,
MeshPartBuilder.VertexInfo p2,
MeshPartBuilder.VertexInfo p3)
Add a triangle.
|
void |
triangle(short index1,
short index2,
short index3)
Add a triangle by indices.
|
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.
|
public static VertexAttributes createAttributes(long usage)
usage
- bitwise mask of the VertexAttributes.Usage
, only Position, Color, Normal and
TextureCoordinates is supported.public void begin(long attributes)
part(String, int)
to start a MeshPart
.attributes
- bitwise mask of the VertexAttributes.Usage
, only Position, Color, Normal
and TextureCoordinates is supported.public void begin(VertexAttributes attributes)
part(String, int)
to start a MeshPart
.public void begin(long attributes, int primitiveType)
attributes
- bitwise mask of the VertexAttributes.Usage
, only Position, Color, Normal
and TextureCoordinates is supported.public void begin(VertexAttributes attributes, int primitiveType)
public MeshPart part(String id, int primitiveType)
public Mesh end(Mesh mesh)
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.public Mesh end()
public int getNumVertices()
public int getNumIndices()
public VertexAttributes getAttributes()
getAttributes
in interface MeshPartBuilder
VertexAttributes
available for building.public MeshPart getMeshPart()
getMeshPart
in interface MeshPartBuilder
MeshPart
currently building.public void setColor(float r, float g, float b, float a)
MeshPartBuilder
VertexAttributes.Usage.ColorPacked
or
VertexAttributes.Usage.ColorUnpacked
.setColor
in interface MeshPartBuilder
public void setColor(Color color)
MeshPartBuilder
VertexAttributes.Usage.ColorPacked
or
VertexAttributes.Usage.ColorUnpacked
.setColor
in interface MeshPartBuilder
public void setUVRange(float u1, float v1, float u2, float v2)
MeshPartBuilder
setUVRange
in interface MeshPartBuilder
public void setUVRange(TextureRegion region)
MeshPartBuilder
setUVRange
in interface MeshPartBuilder
public Matrix4 getVertexTransform(Matrix4 out)
MeshPartBuilder
getVertexTransform
in interface MeshPartBuilder
public void setVertexTransform(Matrix4 transform)
MeshPartBuilder
setVertexTransform
in interface MeshPartBuilder
public boolean isVertexTransformationEnabled()
MeshPartBuilder
isVertexTransformationEnabled
in interface MeshPartBuilder
public void setVertexTransformationEnabled(boolean enabled)
MeshPartBuilder
setVertexTransformationEnabled
in interface MeshPartBuilder
public void ensureVertices(int numVertices)
numVertices
- The number of vertices you are about to addpublic void ensureIndices(int numIndices)
numIndices
- The number of indices you are about to addpublic void ensureCapacity(int numVertices, int numIndices)
numVertices
- The number of vertices you are about to addnumIndices
- The number of indices you are about to addpublic void ensureTriangleIndices(int numTriangles)
numTriangles
- The number of triangles you are about to addpublic void ensureTriangles(int numVertices, int numTriangles)
numVertices
- The number of vertices you are about to addnumTriangles
- The number of triangles you are about to addpublic void ensureTriangles(int numTriangles)
numTriangles
- The number of triangles you are about to addpublic void ensureRectangleIndices(int numRectangles)
numRectangles
- The number of rectangles you are about to addpublic void ensureRectangles(int numVertices, int numRectangles)
numVertices
- The number of vertices you are about to addnumRectangles
- The number of rectangles you are about to addpublic void ensureRectangles(int numRectangles)
numRectangles
- The number of rectangles you are about to addpublic short lastIndex()
lastIndex
in interface MeshPartBuilder
public short vertex(Vector3 pos, Vector3 nor, Color col, Vector2 uv)
MeshPartBuilder
MeshPartBuilder.getAttributes()
to check which values are available.vertex
in interface MeshPartBuilder
public short vertex(float... values)
MeshPartBuilder
vertex
in interface MeshPartBuilder
public short vertex(MeshPartBuilder.VertexInfo info)
MeshPartBuilder
MeshPartBuilder.getAttributes()
to check which values are available.vertex
in interface MeshPartBuilder
public void index(short value)
MeshPartBuilder
index
in interface MeshPartBuilder
public void index(short value1, short value2)
MeshPartBuilder
index
in interface MeshPartBuilder
public void index(short value1, short value2, short value3)
MeshPartBuilder
index
in interface MeshPartBuilder
public void index(short value1, short value2, short value3, short value4)
MeshPartBuilder
index
in interface MeshPartBuilder
public void index(short value1, short value2, short value3, short value4, short value5, short value6)
MeshPartBuilder
index
in interface MeshPartBuilder
public void index(short value1, short value2, short value3, short value4, short value5, short value6, short value7, short value8)
MeshPartBuilder
index
in interface MeshPartBuilder
public void line(short index1, short index2)
MeshPartBuilder
line
in interface MeshPartBuilder
public void line(MeshPartBuilder.VertexInfo p1, MeshPartBuilder.VertexInfo p2)
MeshPartBuilder
line
in interface MeshPartBuilder
public void line(Vector3 p1, Vector3 p2)
MeshPartBuilder
line
in interface MeshPartBuilder
public void line(float x1, float y1, float z1, float x2, float y2, float z2)
MeshPartBuilder
line
in interface MeshPartBuilder
public void line(Vector3 p1, Color c1, Vector3 p2, Color c2)
MeshPartBuilder
line
in interface MeshPartBuilder
public void triangle(short index1, short index2, short index3)
MeshPartBuilder
triangle
in interface MeshPartBuilder
public void triangle(MeshPartBuilder.VertexInfo p1, MeshPartBuilder.VertexInfo p2, MeshPartBuilder.VertexInfo p3)
MeshPartBuilder
triangle
in interface MeshPartBuilder
public void triangle(Vector3 p1, Vector3 p2, Vector3 p3)
MeshPartBuilder
triangle
in interface MeshPartBuilder
public void triangle(Vector3 p1, Color c1, Vector3 p2, Color c2, Vector3 p3, Color c3)
MeshPartBuilder
triangle
in interface MeshPartBuilder
public void rect(short corner00, short corner10, short corner11, short corner01)
MeshPartBuilder
rect
in interface MeshPartBuilder
public void rect(MeshPartBuilder.VertexInfo corner00, MeshPartBuilder.VertexInfo corner10, MeshPartBuilder.VertexInfo corner11, MeshPartBuilder.VertexInfo corner01)
MeshPartBuilder
rect
in interface MeshPartBuilder
public void rect(Vector3 corner00, Vector3 corner10, Vector3 corner11, Vector3 corner01, Vector3 normal)
MeshPartBuilder
rect
in interface MeshPartBuilder
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)
MeshPartBuilder
rect
in interface MeshPartBuilder
public void patch(MeshPartBuilder.VertexInfo corner00, MeshPartBuilder.VertexInfo corner10, MeshPartBuilder.VertexInfo corner11, MeshPartBuilder.VertexInfo corner01, int divisionsU, int divisionsV)
MeshPartBuilder
patch
in interface MeshPartBuilder
public void patch(Vector3 corner00, Vector3 corner10, Vector3 corner11, Vector3 corner01, Vector3 normal, int divisionsU, int divisionsV)
MeshPartBuilder
patch
in interface MeshPartBuilder
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)
MeshPartBuilder
patch
in interface MeshPartBuilder
public 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)
MeshPartBuilder
box
in interface MeshPartBuilder
public void box(Vector3 corner000, Vector3 corner010, Vector3 corner100, Vector3 corner110, Vector3 corner001, Vector3 corner011, Vector3 corner101, Vector3 corner111)
MeshPartBuilder
box
in interface MeshPartBuilder
public void box(Matrix4 transform)
MeshPartBuilder
box
in interface MeshPartBuilder
public void box(float width, float height, float depth)
MeshPartBuilder
box
in interface MeshPartBuilder
public void box(float x, float y, float z, float width, float height, float depth)
MeshPartBuilder
box
in interface MeshPartBuilder
public void circle(float radius, int divisions, float centerX, float centerY, float centerZ, float normalX, float normalY, float normalZ)
MeshPartBuilder
circle
in interface MeshPartBuilder
public void circle(float radius, int divisions, Vector3 center, Vector3 normal)
MeshPartBuilder
circle
in interface MeshPartBuilder
public void circle(float radius, int divisions, Vector3 center, Vector3 normal, Vector3 tangent, Vector3 binormal)
MeshPartBuilder
circle
in interface MeshPartBuilder
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)
MeshPartBuilder
circle
in interface MeshPartBuilder
public void circle(float radius, int divisions, float centerX, float centerY, float centerZ, float normalX, float normalY, float normalZ, float angleFrom, float angleTo)
MeshPartBuilder
circle
in interface MeshPartBuilder
public void circle(float radius, int divisions, Vector3 center, Vector3 normal, float angleFrom, float angleTo)
MeshPartBuilder
circle
in interface MeshPartBuilder
public void circle(float radius, int divisions, Vector3 center, Vector3 normal, Vector3 tangent, Vector3 binormal, float angleFrom, float angleTo)
MeshPartBuilder
circle
in interface MeshPartBuilder
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)
MeshPartBuilder
circle
in interface MeshPartBuilder
public void ellipse(float width, float height, int divisions, float centerX, float centerY, float centerZ, float normalX, float normalY, float normalZ)
MeshPartBuilder
ellipse
in interface MeshPartBuilder
public void ellipse(float width, float height, int divisions, Vector3 center, Vector3 normal)
MeshPartBuilder
ellipse
in interface MeshPartBuilder
public void ellipse(float width, float height, int divisions, Vector3 center, Vector3 normal, Vector3 tangent, Vector3 binormal)
MeshPartBuilder
ellipse
in interface MeshPartBuilder
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)
MeshPartBuilder
ellipse
in interface MeshPartBuilder
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)
MeshPartBuilder
ellipse
in interface MeshPartBuilder
public void ellipse(float width, float height, int divisions, Vector3 center, Vector3 normal, float angleFrom, float angleTo)
MeshPartBuilder
ellipse
in interface MeshPartBuilder
public void ellipse(float width, float height, int divisions, Vector3 center, Vector3 normal, Vector3 tangent, Vector3 binormal, float angleFrom, float angleTo)
MeshPartBuilder
ellipse
in interface MeshPartBuilder
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)
MeshPartBuilder
ellipse
in interface MeshPartBuilder
public void ellipse(float width, float height, float innerWidth, float innerHeight, int divisions, Vector3 center, Vector3 normal)
MeshPartBuilder
ellipse
in interface MeshPartBuilder
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)
MeshPartBuilder
ellipse
in interface MeshPartBuilder
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)
MeshPartBuilder
ellipse
in interface MeshPartBuilder
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)
MeshPartBuilder
ellipse
in interface MeshPartBuilder
public void cylinder(float width, float height, float depth, int divisions)
MeshPartBuilder
cylinder
in interface MeshPartBuilder
public void cylinder(float width, float height, float depth, int divisions, float angleFrom, float angleTo)
MeshPartBuilder
cylinder
in interface MeshPartBuilder
public void cylinder(float width, float height, float depth, int divisions, float angleFrom, float angleTo, boolean close)
cylinder
in interface MeshPartBuilder
public void cone(float width, float height, float depth, int divisions)
MeshPartBuilder
cone
in interface MeshPartBuilder
public void cone(float width, float height, float depth, int divisions, float angleFrom, float angleTo)
MeshPartBuilder
cone
in interface MeshPartBuilder
public void sphere(float width, float height, float depth, int divisionsU, int divisionsV)
MeshPartBuilder
sphere
in interface MeshPartBuilder
public void sphere(Matrix4 transform, float width, float height, float depth, int divisionsU, int divisionsV)
MeshPartBuilder
sphere
in interface MeshPartBuilder
public void sphere(float width, float height, float depth, int divisionsU, int divisionsV, float angleUFrom, float angleUTo, float angleVFrom, float angleVTo)
MeshPartBuilder
sphere
in interface MeshPartBuilder
public void sphere(Matrix4 transform, float width, float height, float depth, int divisionsU, int divisionsV, float angleUFrom, float angleUTo, float angleVFrom, float angleVTo)
MeshPartBuilder
sphere
in interface MeshPartBuilder
public void capsule(float radius, float height, int divisions)
MeshPartBuilder
capsule
in interface MeshPartBuilder
public void arrow(float x1, float y1, float z1, float x2, float y2, float z2, float capLength, float stemThickness, int divisions)
MeshPartBuilder
arrow
in interface MeshPartBuilder
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 basespublic void addMesh(Mesh mesh)
MeshPartBuilder
addMesh
in interface MeshPartBuilder
mesh
- The mesh to copy, must have the same vertex attributes and must be indexed.public void addMesh(MeshPart meshpart)
MeshPartBuilder
addMesh
in interface MeshPartBuilder
meshpart
- The MeshPart to copy, must have the same vertex attributes, primitive type and must be indexed.public void addMesh(Mesh mesh, int indexOffset, int numIndices)
MeshPartBuilder
addMesh
in interface MeshPartBuilder
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.Copyright © 2015. All rights reserved.