com.badlogic.gdx.graphics.g3d.utils
Class MeshBuilder

java.lang.Object
  extended by com.badlogic.gdx.graphics.g3d.utils.MeshBuilder
All Implemented Interfaces:
MeshPartBuilder

public class MeshBuilder
extends Object
implements MeshPartBuilder

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().

Author:
Xoppa

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.badlogic.gdx.graphics.g3d.utils.MeshPartBuilder
MeshPartBuilder.VertexInfo
 
Constructor Summary
MeshBuilder()
           
 
Method Summary
 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
 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()
           
 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.
 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 if no vertex color is provided, or null to not use a default color.
 void setColor(float r, float g, float b, float a)
          Set the color used if no vertex color is provided.
 void setUVRange(float u1, float v1, float u2, float v2)
          Set range of texture coordinates used (default is 0,0,1,1).
 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.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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(VertexAttributes attributes)
Begin building a mesh. Call part(String, int) to start a MeshPart.


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(String id,
                     int primitiveType)
Starts a new MeshPart. The mesh part is not usable until end() is called


end

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


getAttributes

public VertexAttributes getAttributes()
Specified by:
getAttributes in interface MeshPartBuilder
Returns:
The VertexAttributes available for building.

getMeshPart

public MeshPart getMeshPart()
Specified by:
getMeshPart in interface MeshPartBuilder
Returns:
The MeshPart currently building.

setColor

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

Specified by:
setColor in interface MeshPartBuilder

setColor

public void setColor(Color color)
Description copied from interface: MeshPartBuilder
Set the color used if no vertex color is provided, or null to not use a default color.

Specified by:
setColor in interface MeshPartBuilder

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)
Increases the size of the backing vertices array to accommodate the specified number of additional vertices. Useful before adding many vertices to avoid multiple backing array resizes.

Parameters:
numVertices - The number of vertices you are about to add

ensureIndices

public void ensureIndices(int numIndices)
Increases the size of the backing indices array to accommodate the specified number of additional indices. Useful before adding many indices to avoid multiple backing array resizes.

Parameters:
numIndices - The number of indices you are about to add

ensureCapacity

public void ensureCapacity(int numVertices,
                           int numIndices)
Increases the size of the backing vertices and indices arrays to accommodate the specified number of additional vertices and indices. Useful before adding many vertices and indices to avoid multiple backing array resizes.

Parameters:
numVertices - The number of vertices you are about to add
numIndices - The number of indices you are about to add

ensureTriangleIndices

public void ensureTriangleIndices(int numTriangles)
Increases the size of the backing indices array to accommodate the specified number of additional triangles. Useful before adding many triangles to avoid multiple backing array resizes.

Parameters:
numTriangles - The number of triangles you are about to add

ensureTriangles

public void ensureTriangles(int numVertices,
                            int numTriangles)
Increases the size of the backing vertices and indices arrays to accommodate the specified number of additional vertices and triangles. Useful before adding many triangles to avoid multiple backing array resizes.

Parameters:
numVertices - The number of vertices you are about to add
numTriangles - The number of triangles you are about to add

ensureTriangles

public void ensureTriangles(int numTriangles)
Increases the size of the backing vertices and indices arrays to accommodate the specified number of additional vertices and triangles. Useful before adding many triangles to avoid multiple backing array resizes. Assumes each triangles adds 3 vertices.

Parameters:
numTriangles - The number of triangles you are about to add

ensureRectangleIndices

public void ensureRectangleIndices(int numRectangles)
Increases the size of the backing indices array to accommodate the specified number of additional rectangles. Useful before adding many rectangles to avoid multiple backing array resizes.

Parameters:
numRectangles - The number of rectangles you are about to add

ensureRectangles

public void ensureRectangles(int numVertices,
                             int numRectangles)
Increases the size of the backing vertices and indices arrays to accommodate the specified number of additional vertices and rectangles. Useful before adding many rectangles to avoid multiple backing array resizes.

Parameters:
numVertices - The number of vertices you are about to add
numRectangles - The number of rectangles you are about to add

ensureRectangles

public void ensureRectangles(int numRectangles)
Increases the size of the backing vertices and indices arrays to accommodate the specified number of additional vertices and rectangles. Useful before adding many rectangles to avoid multiple backing array resizes. Assumes each rectangles adds 4 vertices

Parameters:
numRectangles - The number of rectangles you are about to add

vertex

public short vertex(Vector3 pos,
                    Vector3 nor,
                    Color col,
                    Vector2 uv)
Description copied from interface: MeshPartBuilder
Add a vertex, returns the index. Null values are allowed. Use MeshPartBuilder.getAttributes() to check which values are available.

Specified by:
vertex in interface MeshPartBuilder

lastIndex

public short 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

vertex

public short vertex(MeshPartBuilder.VertexInfo info)
Description copied from interface: MeshPartBuilder
Add a vertex, returns the index. Use MeshPartBuilder.getAttributes() to check which values are available.

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(MeshPartBuilder.VertexInfo p1,
                 MeshPartBuilder.VertexInfo p2)
Description copied from interface: MeshPartBuilder
Add a line. Requires GL_LINES primitive type.

Specified by:
line in interface MeshPartBuilder

line

public void line(Vector3 p1,
                 Vector3 p2)
Description copied from interface: MeshPartBuilder
Add a line. 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

line

public void line(Vector3 p1,
                 Color c1,
                 Vector3 p2,
                 Color c2)
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

triangle

public void triangle(MeshPartBuilder.VertexInfo p1,
                     MeshPartBuilder.VertexInfo p2,
                     MeshPartBuilder.VertexInfo p3)
Description copied from interface: MeshPartBuilder
Add a triangle. Requires GL_POINTS, GL_LINES or GL_TRIANGLES primitive type.

Specified by:
triangle in interface MeshPartBuilder

triangle

public void triangle(Vector3 p1,
                     Vector3 p2,
                     Vector3 p3)
Description copied from interface: MeshPartBuilder
Add a triangle. Requires GL_POINTS, GL_LINES or GL_TRIANGLES primitive type.

Specified by:
triangle in interface MeshPartBuilder

triangle

public void triangle(Vector3 p1,
                     Color c1,
                     Vector3 p2,
                     Color c2,
                     Vector3 p3,
                     Color c3)
Description copied from interface: MeshPartBuilder
Add a triangle. 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(MeshPartBuilder.VertexInfo corner00,
                 MeshPartBuilder.VertexInfo corner10,
                 MeshPartBuilder.VertexInfo corner11,
                 MeshPartBuilder.VertexInfo corner01)
Description copied from interface: MeshPartBuilder
Add a rectangle. Requires GL_POINTS, GL_LINES or GL_TRIANGLES primitive type.

Specified by:
rect in interface MeshPartBuilder

rect

public void rect(Vector3 corner00,
                 Vector3 corner10,
                 Vector3 corner11,
                 Vector3 corner01,
                 Vector3 normal)
Description copied from interface: MeshPartBuilder
Add a rectangle. 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

patch

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

Specified by:
patch in interface MeshPartBuilder

patch

public void patch(Vector3 corner00,
                  Vector3 corner10,
                  Vector3 corner11,
                  Vector3 corner01,
                  Vector3 normal,
                  int divisionsU,
                  int divisionsV)
Description copied from interface: MeshPartBuilder
Add a rectangle. Requires GL_POINTS, GL_LINES or GL_TRIANGLES primitive type.

Specified by:
patch in interface MeshPartBuilder

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: MeshPartBuilder
Add a rectangle. Requires GL_POINTS, GL_LINES or GL_TRIANGLES primitive type.

Specified by:
patch in interface MeshPartBuilder

box

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)
Description copied from interface: MeshPartBuilder
Add a box. Requires GL_POINTS, GL_LINES or GL_TRIANGLES primitive type.

Specified by:
box in interface MeshPartBuilder

box

public void box(Vector3 corner000,
                Vector3 corner010,
                Vector3 corner100,
                Vector3 corner110,
                Vector3 corner001,
                Vector3 corner011,
                Vector3 corner101,
                Vector3 corner111)
Description copied from interface: MeshPartBuilder
Add a box. Requires GL_POINTS, GL_LINES or GL_TRIANGLES primitive type.

Specified by:
box in interface MeshPartBuilder

box

public void box(Matrix4 transform)
Description copied from interface: MeshPartBuilder
Add a box given the matrix. Requires GL_POINTS, GL_LINES or GL_TRIANGLES primitive type.

Specified by:
box in interface MeshPartBuilder

box

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

Specified by:
box in interface MeshPartBuilder

box

public void box(float x,
                float y,
                float z,
                float width,
                float height,
                float depth)
Description copied from interface: MeshPartBuilder
Add a box at the specified location, with the specified dimensions

Specified by:
box in interface MeshPartBuilder

circle

public void circle(float radius,
                   int divisions,
                   float centerX,
                   float centerY,
                   float centerZ,
                   float normalX,
                   float normalY,
                   float normalZ)
Description copied from interface: MeshPartBuilder
Add a circle

Specified by:
circle in interface MeshPartBuilder

circle

public void circle(float radius,
                   int divisions,
                   Vector3 center,
                   Vector3 normal)
Description copied from interface: MeshPartBuilder
Add a circle

Specified by:
circle in interface MeshPartBuilder

circle

public void circle(float radius,
                   int divisions,
                   Vector3 center,
                   Vector3 normal,
                   Vector3 tangent,
                   Vector3 binormal)
Description copied from interface: MeshPartBuilder
Add a circle

Specified by:
circle in interface MeshPartBuilder

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: MeshPartBuilder
Add a circle

Specified by:
circle in interface MeshPartBuilder

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: MeshPartBuilder
Add a circle

Specified by:
circle in interface MeshPartBuilder

circle

public void circle(float radius,
                   int divisions,
                   Vector3 center,
                   Vector3 normal,
                   float angleFrom,
                   float angleTo)
Description copied from interface: MeshPartBuilder
Add a circle

Specified by:
circle in interface MeshPartBuilder

circle

public void circle(float radius,
                   int divisions,
                   Vector3 center,
                   Vector3 normal,
                   Vector3 tangent,
                   Vector3 binormal,
                   float angleFrom,
                   float angleTo)
Description copied from interface: MeshPartBuilder
Add a circle

Specified by:
circle in interface MeshPartBuilder

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: MeshPartBuilder
Add a circle

Specified by:
circle in interface MeshPartBuilder

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: MeshPartBuilder
Add a circle

Specified by:
ellipse in interface MeshPartBuilder

ellipse

public void ellipse(float width,
                    float height,
                    int divisions,
                    Vector3 center,
                    Vector3 normal)
Description copied from interface: MeshPartBuilder
Add a circle

Specified by:
ellipse in interface MeshPartBuilder

ellipse

public void ellipse(float width,
                    float height,
                    int divisions,
                    Vector3 center,
                    Vector3 normal,
                    Vector3 tangent,
                    Vector3 binormal)
Description copied from interface: MeshPartBuilder
Add a circle

Specified by:
ellipse in interface MeshPartBuilder

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: MeshPartBuilder
Add a circle

Specified by:
ellipse in interface MeshPartBuilder

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: MeshPartBuilder
Add a circle

Specified by:
ellipse in interface MeshPartBuilder

ellipse

public void ellipse(float width,
                    float height,
                    int divisions,
                    Vector3 center,
                    Vector3 normal,
                    float angleFrom,
                    float angleTo)
Description copied from interface: MeshPartBuilder
Add a circle

Specified by:
ellipse in interface MeshPartBuilder

ellipse

public void ellipse(float width,
                    float height,
                    int divisions,
                    Vector3 center,
                    Vector3 normal,
                    Vector3 tangent,
                    Vector3 binormal,
                    float angleFrom,
                    float angleTo)
Description copied from interface: MeshPartBuilder
Add a circle

Specified by:
ellipse in interface MeshPartBuilder

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: MeshPartBuilder
Add a circle

Specified by:
ellipse in interface MeshPartBuilder

ellipse

public void ellipse(float width,
                    float height,
                    float innerWidth,
                    float innerHeight,
                    int divisions,
                    Vector3 center,
                    Vector3 normal)
Description copied from interface: MeshPartBuilder
Add an ellipse

Specified by:
ellipse in interface MeshPartBuilder

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: MeshPartBuilder
Add an ellipse

Specified by:
ellipse in interface MeshPartBuilder

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: MeshPartBuilder
Add an ellipse

Specified by:
ellipse in interface MeshPartBuilder

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: MeshPartBuilder
Add an ellipse

Specified by:
ellipse in interface MeshPartBuilder

cylinder

public void cylinder(float width,
                     float height,
                     float depth,
                     int divisions)
Description copied from interface: MeshPartBuilder
Add a cylinder

Specified by:
cylinder in interface MeshPartBuilder

cylinder

public void cylinder(float width,
                     float height,
                     float depth,
                     int divisions,
                     float angleFrom,
                     float angleTo)
Description copied from interface: MeshPartBuilder
Add a cylinder

Specified by:
cylinder in interface MeshPartBuilder

cylinder

public void cylinder(float width,
                     float height,
                     float depth,
                     int divisions,
                     float angleFrom,
                     float angleTo,
                     boolean close)
Add a cylinder

Specified by:
cylinder in interface MeshPartBuilder

cone

public void cone(float width,
                 float height,
                 float depth,
                 int divisions)
Description copied from interface: MeshPartBuilder
Add a cone

Specified by:
cone in interface MeshPartBuilder

cone

public void cone(float width,
                 float height,
                 float depth,
                 int divisions,
                 float angleFrom,
                 float angleTo)
Description copied from interface: MeshPartBuilder
Add a cone

Specified by:
cone in interface MeshPartBuilder

sphere

public void sphere(float width,
                   float height,
                   float depth,
                   int divisionsU,
                   int divisionsV)
Description copied from interface: MeshPartBuilder
Add a sphere

Specified by:
sphere in interface MeshPartBuilder

sphere

public void sphere(Matrix4 transform,
                   float width,
                   float height,
                   float depth,
                   int divisionsU,
                   int divisionsV)
Description copied from interface: MeshPartBuilder
Add a sphere

Specified by:
sphere in interface MeshPartBuilder

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: MeshPartBuilder
Add a sphere

Specified by:
sphere in interface MeshPartBuilder

sphere

public void sphere(Matrix4 transform,
                   float width,
                   float height,
                   float depth,
                   int divisionsU,
                   int divisionsV,
                   float angleUFrom,
                   float angleUTo,
                   float angleVFrom,
                   float angleVTo)
Description copied from interface: MeshPartBuilder
Add a sphere

Specified by:
sphere in interface MeshPartBuilder

capsule

public void capsule(float radius,
                    float height,
                    int divisions)
Description copied from interface: MeshPartBuilder
Add a capsule

Specified by:
capsule in interface MeshPartBuilder


Copyright © 2013. All Rights Reserved.