public class ModelBuilder
extends java.lang.Object
Constructor and Description |
---|
ModelBuilder() |
Modifier and Type | Method and Description |
---|---|
void |
begin()
Begin building a new model
|
Model |
createBox(float width,
float height,
float depth,
int primitiveType,
Material material,
long attributes)
Convenience method to create a model with a single node containing a box shape.
|
Model |
createBox(float width,
float height,
float depth,
Material material,
long attributes)
Convenience method to create a model with a single node containing a box shape.
|
Model |
createCapsule(float radius,
float height,
int divisions,
int primitiveType,
Material material,
long attributes)
Convenience method to create a model with a single node containing a capsule shape.
|
Model |
createCapsule(float radius,
float height,
int divisions,
Material material,
long attributes)
Convenience method to create a model with a single node containing a capsule shape.
|
Model |
createCone(float width,
float height,
float depth,
int divisions,
int primitiveType,
Material material,
long attributes)
Convenience method to create a model with a single node containing a cone shape.
|
Model |
createCone(float width,
float height,
float depth,
int divisions,
int primitiveType,
Material material,
long attributes,
float angleFrom,
float angleTo)
Convenience method to create a model with a single node containing a cone shape.
|
Model |
createCone(float width,
float height,
float depth,
int divisions,
Material material,
long attributes)
Convenience method to create a model with a single node containing a cone shape.
|
Model |
createCone(float width,
float height,
float depth,
int divisions,
Material material,
long attributes,
float angleFrom,
float angleTo)
Convenience method to create a model with a single node containing a cone shape.
|
Model |
createCylinder(float width,
float height,
float depth,
int divisions,
int primitiveType,
Material material,
long attributes)
Convenience method to create a model with a single node containing a cylinder shape.
|
Model |
createCylinder(float width,
float height,
float depth,
int divisions,
int primitiveType,
Material material,
long attributes,
float angleFrom,
float angleTo)
Convenience method to create a model with a single node containing a cylinder shape.
|
Model |
createCylinder(float width,
float height,
float depth,
int divisions,
Material material,
long attributes)
Convenience method to create a model with a single node containing a cylinder shape.
|
Model |
createCylinder(float width,
float height,
float depth,
int divisions,
Material material,
long attributes,
float angleFrom,
float angleTo)
Convenience method to create a model with a single node containing a cylinder shape.
|
static Model |
createFromMesh(float[] vertices,
VertexAttribute[] attributes,
short[] indices,
int primitiveType,
Material material)
Deprecated.
|
static Model |
createFromMesh(Mesh mesh,
int indexOffset,
int vertexCount,
int primitiveType,
Material material)
Deprecated.
|
static Model |
createFromMesh(Mesh mesh,
int primitiveType,
Material material)
Deprecated.
|
Model |
createRect(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 primitiveType,
Material material,
long attributes)
Convenience method to create a model with a single node containing a rectangle shape.
|
Model |
createRect(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,
Material material,
long attributes)
Convenience method to create a model with a single node containing a rectangle shape.
|
Model |
createSphere(float width,
float height,
float depth,
int divisionsU,
int divisionsV,
int primitiveType,
Material material,
long attributes)
Convenience method to create a model with a single node containing a sphere shape.
|
Model |
createSphere(float width,
float height,
float depth,
int divisionsU,
int divisionsV,
int primitiveType,
Material material,
long attributes,
float angleUFrom,
float angleUTo,
float angleVFrom,
float angleVTo)
Convenience method to create a model with a single node containing a sphere shape.
|
Model |
createSphere(float width,
float height,
float depth,
int divisionsU,
int divisionsV,
Material material,
long attributes)
Convenience method to create a model with a single node containing a sphere shape.
|
Model |
createSphere(float width,
float height,
float depth,
int divisionsU,
int divisionsV,
Material material,
long attributes,
float angleUFrom,
float angleUTo,
float angleVFrom,
float angleVTo)
Convenience method to create a model with a single node containing a sphere shape.
|
Model |
end()
End building the model.
|
void |
manage(Disposable disposable)
Add the
Disposable object to the model, causing it to be disposed when the model is disposed. |
Node |
node()
Add a node to the model.
|
protected Node |
node(Node node)
Adds the
Node to the model and sets it active for building. |
Node |
node(java.lang.String id,
Model model)
Adds the nodes of the specified model to a new node the model being build.
|
void |
part(MeshPart meshpart,
Material material)
Adds the specified MeshPart to the current Node.
|
MeshPartBuilder |
part(java.lang.String id,
int primitiveType,
long attributes,
Material material)
Creates a new MeshPart within the current Node.
|
MeshPart |
part(java.lang.String id,
Mesh mesh,
int primitiveType,
int offset,
int size,
Material material)
Adds the specified mesh part to the current node.
|
MeshPart |
part(java.lang.String id,
Mesh mesh,
int primitiveType,
Material material)
Adds the specified mesh part to the current node.
|
static void |
rebuildReferences(Model model)
Resets the references to materials, meshes and meshparts within the model to the ones used within it's nodes.
|
public void begin()
public Model end()
Model.dispose()
method when no longer used.public Node node()
public Node node(java.lang.String id, Model model)
Model.dispose()
method on that model.public void manage(Disposable disposable)
Disposable
object to the model, causing it to be disposed when the model is disposed.public void part(MeshPart meshpart, Material material)
manage(Disposable)
to add those to the model.public MeshPart part(java.lang.String id, Mesh mesh, int primitiveType, int offset, int size, Material material)
manage(Disposable)
to add those to the model.public MeshPart part(java.lang.String id, Mesh mesh, int primitiveType, Material material)
manage(Disposable)
to add those to the model.public MeshPartBuilder part(java.lang.String id, int primitiveType, long attributes, Material material)
manage(Disposable)
to add those to the model.attributes
- bitwise mask of the VertexAttributes.Usage
,
only Position, Color, Normal and TextureCoordinates is supported.MeshPartBuilder
you can use to build the MeshPart.public Model createBox(float width, float height, float depth, Material material, long attributes)
Model.manageDisposable(Disposable)
to add those to the model.attributes
- bitwise mask of the VertexAttributes.Usage
,
only Position, Color, Normal and TextureCoordinates is supported.public Model createBox(float width, float height, float depth, int primitiveType, Material material, long attributes)
Model.manageDisposable(Disposable)
to add those to the model.attributes
- bitwise mask of the VertexAttributes.Usage
,
only Position, Color, Normal and TextureCoordinates is supported.public Model createRect(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, Material material, long attributes)
Model.manageDisposable(Disposable)
to add those to the model.attributes
- bitwise mask of the VertexAttributes.Usage
,
only Position, Color, Normal and TextureCoordinates is supported.public Model createRect(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 primitiveType, Material material, long attributes)
Model.manageDisposable(Disposable)
to add those to the model.attributes
- bitwise mask of the VertexAttributes.Usage
,
only Position, Color, Normal and TextureCoordinates is supported.public Model createCylinder(float width, float height, float depth, int divisions, Material material, long attributes)
Model.manageDisposable(Disposable)
to add those to the model.attributes
- bitwise mask of the VertexAttributes.Usage
,
only Position, Color, Normal and TextureCoordinates is supported.public Model createCylinder(float width, float height, float depth, int divisions, int primitiveType, Material material, long attributes)
Model.manageDisposable(Disposable)
to add those to the model.attributes
- bitwise mask of the VertexAttributes.Usage
,
only Position, Color, Normal and TextureCoordinates is supported.public Model createCylinder(float width, float height, float depth, int divisions, Material material, long attributes, float angleFrom, float angleTo)
Model.manageDisposable(Disposable)
to add those to the model.attributes
- bitwise mask of the VertexAttributes.Usage
,
only Position, Color, Normal and TextureCoordinates is supported.public Model createCylinder(float width, float height, float depth, int divisions, int primitiveType, Material material, long attributes, float angleFrom, float angleTo)
Model.manageDisposable(Disposable)
to add those to the model.attributes
- bitwise mask of the VertexAttributes.Usage
,
only Position, Color, Normal and TextureCoordinates is supported.public Model createCone(float width, float height, float depth, int divisions, Material material, long attributes)
Model.manageDisposable(Disposable)
to add those to the model.attributes
- bitwise mask of the VertexAttributes.Usage
,
only Position, Color, Normal and TextureCoordinates is supported.public Model createCone(float width, float height, float depth, int divisions, int primitiveType, Material material, long attributes)
Model.manageDisposable(Disposable)
to add those to the model.attributes
- bitwise mask of the VertexAttributes.Usage
,
only Position, Color, Normal and TextureCoordinates is supported.public Model createCone(float width, float height, float depth, int divisions, Material material, long attributes, float angleFrom, float angleTo)
Model.manageDisposable(Disposable)
to add those to the model.attributes
- bitwise mask of the VertexAttributes.Usage
,
only Position, Color, Normal and TextureCoordinates is supported.public Model createCone(float width, float height, float depth, int divisions, int primitiveType, Material material, long attributes, float angleFrom, float angleTo)
Model.manageDisposable(Disposable)
to add those to the model.attributes
- bitwise mask of the VertexAttributes.Usage
,
only Position, Color, Normal and TextureCoordinates is supported.public Model createSphere(float width, float height, float depth, int divisionsU, int divisionsV, Material material, long attributes)
Model.manageDisposable(Disposable)
to add those to the model.attributes
- bitwise mask of the VertexAttributes.Usage
,
only Position, Color, Normal and TextureCoordinates is supported.public Model createSphere(float width, float height, float depth, int divisionsU, int divisionsV, int primitiveType, Material material, long attributes)
Model.manageDisposable(Disposable)
to add those to the model.attributes
- bitwise mask of the VertexAttributes.Usage
,
only Position, Color, Normal and TextureCoordinates is supported.public Model createSphere(float width, float height, float depth, int divisionsU, int divisionsV, Material material, long attributes, float angleUFrom, float angleUTo, float angleVFrom, float angleVTo)
Model.manageDisposable(Disposable)
to add those to the model.attributes
- bitwise mask of the VertexAttributes.Usage
,
only Position, Color, Normal and TextureCoordinates is supported.public Model createSphere(float width, float height, float depth, int divisionsU, int divisionsV, int primitiveType, Material material, long attributes, float angleUFrom, float angleUTo, float angleVFrom, float angleVTo)
Model.manageDisposable(Disposable)
to add those to the model.attributes
- bitwise mask of the VertexAttributes.Usage
,
only Position, Color, Normal and TextureCoordinates is supported.public Model createCapsule(float radius, float height, int divisions, Material material, long attributes)
Model.manageDisposable(Disposable)
to add those to the model.attributes
- bitwise mask of the VertexAttributes.Usage
,
only Position, Color, Normal and TextureCoordinates is supported.public Model createCapsule(float radius, float height, int divisions, int primitiveType, Material material, long attributes)
Model.manageDisposable(Disposable)
to add those to the model.attributes
- bitwise mask of the VertexAttributes.Usage
,
only Position, Color, Normal and TextureCoordinates is supported.public static void rebuildReferences(Model model)
@Deprecated public static Model createFromMesh(Mesh mesh, int primitiveType, Material material)
@Deprecated public static Model createFromMesh(Mesh mesh, int indexOffset, int vertexCount, int primitiveType, Material material)
@Deprecated public static Model createFromMesh(float[] vertices, VertexAttribute[] attributes, short[] indices, int primitiveType, Material material)