com.badlogic.gdx.graphics.g3d.utils
Interface MeshPartBuilder

All Known Implementing Classes:
MeshBuilder

public interface MeshPartBuilder


Nested Class Summary
static class MeshPartBuilder.VertexInfo
          Class that contains all vertex information the builder can use.
 
Method Summary
 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
 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
 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.
 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.
 

Method Detail

getMeshPart

MeshPart getMeshPart()
Returns:
The MeshPart currently building.

getAttributes

VertexAttributes getAttributes()
Returns:
The VertexAttributes available for building.

setColor

void setColor(Color color)
Set the color used if no vertex color is provided, or null to not use a default color.


setColor

void setColor(float r,
              float g,
              float b,
              float a)
Set the color used if no vertex color is provided.


setUVRange

void setUVRange(float u1,
                float v1,
                float u2,
                float v2)
Set range of texture coordinates used (default is 0,0,1,1).


vertex

short vertex(float... values)
Add one or more vertices, returns the index of the last vertex added. The length of values must a power of the vertex size.


vertex

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


vertex

short vertex(MeshPartBuilder.VertexInfo info)
Add a vertex, returns the index. Use getAttributes() to check which values are available.


lastIndex

short lastIndex()
Returns:
The index of the last added vertex.

index

void index(short value)
Add an index, MeshPartBuilder expects all meshes to be indexed.


index

void index(short value1,
           short value2)
Add multiple indices, MeshPartBuilder expects all meshes to be indexed.


index

void index(short value1,
           short value2,
           short value3)
Add multiple indices, MeshPartBuilder expects all meshes to be indexed.


index

void index(short value1,
           short value2,
           short value3,
           short value4)
Add multiple indices, MeshPartBuilder expects all meshes to be indexed.


index

void index(short value1,
           short value2,
           short value3,
           short value4,
           short value5,
           short value6)
Add multiple indices, MeshPartBuilder expects all meshes to be indexed.


index

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.


line

void line(short index1,
          short index2)
Add a line by indices. Requires GL_LINES primitive type.


line

void line(MeshPartBuilder.VertexInfo p1,
          MeshPartBuilder.VertexInfo p2)
Add a line. Requires GL_LINES primitive type.


line

void line(Vector3 p1,
          Vector3 p2)
Add a line. Requires GL_LINES primitive type.


line

void line(float x1,
          float y1,
          float z1,
          float x2,
          float y2,
          float z2)
Add a line. Requires GL_LINES primitive type.


line

void line(Vector3 p1,
          Color c1,
          Vector3 p2,
          Color c2)
Add a line. Requires GL_LINES primitive type.


triangle

void triangle(short index1,
              short index2,
              short index3)
Add a triangle by indices. Requires GL_POINTS, GL_LINES or GL_TRIANGLES primitive type.


triangle

void triangle(MeshPartBuilder.VertexInfo p1,
              MeshPartBuilder.VertexInfo p2,
              MeshPartBuilder.VertexInfo p3)
Add a triangle. Requires GL_POINTS, GL_LINES or GL_TRIANGLES primitive type.


triangle

void triangle(Vector3 p1,
              Vector3 p2,
              Vector3 p3)
Add a triangle. Requires GL_POINTS, GL_LINES or GL_TRIANGLES primitive type.


triangle

void triangle(Vector3 p1,
              Color c1,
              Vector3 p2,
              Color c2,
              Vector3 p3,
              Color c3)
Add a triangle. Requires GL_POINTS, GL_LINES or GL_TRIANGLES primitive type.


rect

void rect(short corner00,
          short corner10,
          short corner11,
          short corner01)
Add a rectangle by indices. Requires GL_POINTS, GL_LINES or GL_TRIANGLES primitive type.


rect

void rect(MeshPartBuilder.VertexInfo corner00,
          MeshPartBuilder.VertexInfo corner10,
          MeshPartBuilder.VertexInfo corner11,
          MeshPartBuilder.VertexInfo corner01)
Add a rectangle. Requires GL_POINTS, GL_LINES or GL_TRIANGLES primitive type.


rect

void rect(Vector3 corner00,
          Vector3 corner10,
          Vector3 corner11,
          Vector3 corner01,
          Vector3 normal)
Add a rectangle. Requires GL_POINTS, GL_LINES or GL_TRIANGLES primitive type.


rect

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.


patch

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


patch

void patch(Vector3 corner00,
           Vector3 corner10,
           Vector3 corner11,
           Vector3 corner01,
           Vector3 normal,
           int divisionsU,
           int divisionsV)
Add a rectangle. Requires GL_POINTS, GL_LINES or GL_TRIANGLES primitive type.


patch

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. Requires GL_POINTS, GL_LINES or GL_TRIANGLES primitive type.


box

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. Requires GL_POINTS, GL_LINES or GL_TRIANGLES primitive type.


box

void box(Vector3 corner000,
         Vector3 corner010,
         Vector3 corner100,
         Vector3 corner110,
         Vector3 corner001,
         Vector3 corner011,
         Vector3 corner101,
         Vector3 corner111)
Add a box. Requires GL_POINTS, GL_LINES or GL_TRIANGLES primitive type.


box

void box(Matrix4 transform)
Add a box given the matrix. Requires GL_POINTS, GL_LINES or GL_TRIANGLES primitive type.


box

void box(float width,
         float height,
         float depth)
Add a box with the specified dimensions. Requires GL_POINTS, GL_LINES or GL_TRIANGLES primitive type.


box

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


circle

void circle(float radius,
            int divisions,
            float centerX,
            float centerY,
            float centerZ,
            float normalX,
            float normalY,
            float normalZ)
Add a circle


circle

void circle(float radius,
            int divisions,
            Vector3 center,
            Vector3 normal)
Add a circle


circle

void circle(float radius,
            int divisions,
            Vector3 center,
            Vector3 normal,
            Vector3 tangent,
            Vector3 binormal)
Add a circle


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


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


circle

void circle(float radius,
            int divisions,
            Vector3 center,
            Vector3 normal,
            float angleFrom,
            float angleTo)
Add a circle


circle

void circle(float radius,
            int divisions,
            Vector3 center,
            Vector3 normal,
            Vector3 tangent,
            Vector3 binormal,
            float angleFrom,
            float angleTo)
Add a circle


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


ellipse

void ellipse(float width,
             float height,
             int divisions,
             float centerX,
             float centerY,
             float centerZ,
             float normalX,
             float normalY,
             float normalZ)
Add a circle


ellipse

void ellipse(float width,
             float height,
             int divisions,
             Vector3 center,
             Vector3 normal)
Add a circle


ellipse

void ellipse(float width,
             float height,
             int divisions,
             Vector3 center,
             Vector3 normal,
             Vector3 tangent,
             Vector3 binormal)
Add a circle


ellipse

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


ellipse

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


ellipse

void ellipse(float width,
             float height,
             int divisions,
             Vector3 center,
             Vector3 normal,
             float angleFrom,
             float angleTo)
Add a circle


ellipse

void ellipse(float width,
             float height,
             int divisions,
             Vector3 center,
             Vector3 normal,
             Vector3 tangent,
             Vector3 binormal,
             float angleFrom,
             float angleTo)
Add a circle


ellipse

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


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


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


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)
Add an ellipse


ellipse

void ellipse(float width,
             float height,
             float innerWidth,
             float innerHeight,
             int divisions,
             Vector3 center,
             Vector3 normal)
Add an ellipse


cylinder

void cylinder(float width,
              float height,
              float depth,
              int divisions)
Add a cylinder


cylinder

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


cylinder

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


cone

void cone(float width,
          float height,
          float depth,
          int divisions)
Add a cone


cone

void cone(float width,
          float height,
          float depth,
          int divisions,
          float angleFrom,
          float angleTo)
Add a cone


sphere

void sphere(float width,
            float height,
            float depth,
            int divisionsU,
            int divisionsV)
Add a sphere


sphere

void sphere(Matrix4 transform,
            float width,
            float height,
            float depth,
            int divisionsU,
            int divisionsV)
Add a sphere


sphere

void sphere(float width,
            float height,
            float depth,
            int divisionsU,
            int divisionsV,
            float angleUFrom,
            float angleUTo,
            float angleVFrom,
            float angleVTo)
Add a sphere


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


capsule

void capsule(float radius,
             float height,
             int divisions)
Add a capsule



Copyright © 2013. All Rights Reserved.