Package gaiasky.util.gdx
Class IntModelBuilder
java.lang.Object
gaiasky.util.gdx.IntModelBuilder
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
begin()
Begin building a new modelcreateArrow
(float x1, float y1, float z1, float x2, float y2, float z2, float capLength, float stemThickness, int divisions, int primitiveType, Material material, Bits attributes) Convenience method to create a model with an arrow.createArrow
(com.badlogic.gdx.math.Vector3 from, com.badlogic.gdx.math.Vector3 to, Material material, Bits attributes) Convenience method to create a model with an arrow.createBox
(float width, float height, float depth, int primitiveType, Material material, Bits attributes) Convenience method to create a model with a single node containing a box shape.Convenience method to create a model with a single node containing a box shape.createCapsule
(float radius, float height, int divisions, int primitiveType, Material material, Bits attributes) Convenience method to create a model with a single node containing a capsule shape.createCapsule
(float radius, float height, int divisions, Material material, Bits attributes) Convenience method to create a model with a single node containing a capsule shape.createCone
(float width, float height, float depth, int divisions, int hdivisions, int primitiveType, Material material, Bits attributes) Convenience method to create a model with a single node containing a cone shape.createCone
(float width, float height, float depth, int divisions, int hdivisions, int primitiveType, Material material, Bits attributes, float angleFrom, float angleTo) Convenience method to create a model with a single node containing a cone shape.createCone
(float width, float height, float depth, int divisions, int primitiveType, Material material, Bits attributes) Convenience method to create a model with a single node containing a cone shape.createCone
(float width, float height, float depth, int divisions, int primitiveType, Material material, Bits attributes, float angleFrom, float angleTo) Convenience method to create a model with a single node containing a cone shape.createCone
(float width, float height, float depth, int divisions, Material material, Bits attributes) Convenience method to create a model with a single node containing a cone shape.createCone
(float width, float height, float depth, int divisions, Material material, Bits attributes, float angleFrom, float angleTo) Convenience method to create a model with a single node containing a cone shape.createCylinder
(float width, float height, float depth, int divisions, boolean flipNormals, int primitiveType, Material material, Bits attributes) Convenience method to create a model with a single node containing a cylinder shape.createCylinder
(float width, float height, float depth, int divisions, boolean flipNormals, Material material, Bits attributes) Convenience method to create a model with a single node containing a cylinder shape.createCylinder
(float width, float height, float depth, int divisions, int primitiveType, Material material, Bits attributes) Convenience method to create a model with a single node containing a cylinder shape.createCylinder
(float width, float height, float depth, int divisions, int primitiveType, Material material, Bits attributes, float angleFrom, float angleTo) Convenience method to create a model with a single node containing a cylinder shape.createCylinder
(float width, float height, float depth, int divisions, Material material, Bits attributes) Convenience method to create a model with a single node containing a cylinder shape.createCylinder
(float width, float height, float depth, int divisions, Material material, Bits attributes, float angleFrom, float angleTo) Convenience method to create a model with a single node containing a cylinder shape.static IntModel
createFromMesh
(float[] vertices, com.badlogic.gdx.graphics.VertexAttribute[] attributes, int[] indices, int primitiveType, Material material) Deprecated.static IntModel
createFromMesh
(IntMesh mesh, int indexOffset, int vertexCount, int primitiveType, Material material) Deprecated.static IntModel
createFromMesh
(IntMesh mesh, int primitiveType, Material material) Deprecated.createIcoSphere
(float radius, int recursion, boolean flipNormals, boolean hardEdges, int primitiveType, Material material, Bits attributes) createIcoSphere
(float radius, int recursion, boolean flipNormals, boolean hardEdges, Material material, Bits attributes) Convenience method to create a model with a single node containing an ico-sphere shape.createLineGrid
(int xDivisions, int zDivisions, float xSize, float zSize, Material material, Bits attributes) Convenience method to create a model which represents a grid of lines on the XZ plane.createOctahedronSphere
(float radius, int divisions, boolean flipNormals, boolean hardEdges, int primitiveType, Material material, Bits attributes) Creates an octahedron-spherecreateOctahedronSphere
(float radius, int divisions, boolean flipNormals, boolean hardEdges, Material material, Bits attributes) Convenience method to create a model with a single node containing an octahedron-sphere shape.createPlane
(float width, float height, int divisionsU, int divisionsV, boolean flip, int primitiveType, Material material, Bits attributes) createPlane
(float side, int divisionsU, int divisionsV, boolean flip, int primitiveType, Material material, Bits attributes) 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, Bits attributes) Convenience method to create a model with a single node containing a rectangle shape.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, Bits attributes) Convenience method to create a model with a single node containing a rectangle shape.createRing
(float sphereDiameter, int divisionsU, int divisionsV, float innerRingRadius, float outerRingRadius, int ringDivisions, int primitiveType, Material materialShpere, Material materialRing, Bits attributes) Convenience method to create a ring model.createSphere
(float width, float height, float depth, int divisionsU, int divisionsV, boolean flipNormals, int primitiveType, Material material, Bits attributes) Convenience method to create a model with a single node containing a sphere shape.createSphere
(float width, float height, float depth, int divisionsU, int divisionsV, boolean flipNormals, int primitiveType, Material material, Bits attributes, float angleUFrom, float angleUTo, float angleVFrom, float angleVTo) Convenience method to create a model with a single node containing a sphere shape.createSphere
(float width, float height, float depth, int divisionsU, int divisionsV, boolean flipNormals, Material material, Bits attributes) Convenience method to create a model with a single node containing a sphere shape.createSphere
(float width, float height, float depth, int divisionsU, int divisionsV, boolean flipNormals, Material material, Bits attributes, float angleUFrom, float angleUTo, float angleVFrom, float angleVTo) Convenience method to create a model with a single node containing a sphere shape.createSphere
(float width, float height, float depth, int divisionsU, int divisionsV, int primitiveType, Material material, Bits attributes) Convenience method to create a model with a single node containing a sphere shape.createSphere
(float width, float height, float depth, int divisionsU, int divisionsV, int primitiveType, Material material, Bits attributes, float angleUFrom, float angleUTo, float angleVFrom, float angleVTo) Convenience method to create a model with a single node containing a sphere shape.createSphere
(float width, float height, float depth, int divisionsU, int divisionsV, Material material, Bits attributes) Convenience method to create a model with a single node containing a sphere shape.createSphere
(float width, float height, float depth, int divisionsU, int divisionsV, Material material, Bits attributes, float angleUFrom, float angleUTo, float angleVFrom, float angleVTo) Convenience method to create a model with a single node containing a sphere shape.createSphere
(float diameter, int divisionsU, int divisionsV, boolean flipNormals, Material material, Bits attributes) Convenience method to create a model with a single node containing a sphere shape.createSphere
(float diameter, int divisionsU, int divisionsV, Material material, Bits attributes) Convenience method to create a model with a single node containing a sphere shape.createSphereRing
(float sphereDiameter, int divisionsU, int divisionsV, float innerRingRadius, float outerRingRadius, int ringDivisions, int primitiveType, Material materialShpere, Material materialRing, Bits attributes) Convenience method to create a sphere with a ring.createXYZCoordinates
(float axisLength, float capLength, float stemThickness, int divisions, int primitiveType, Material material, Bits attributes) Convenience method to create a model with three orthonormal vectors shapes.createXYZCoordinates
(float axisLength, Material material, Bits attributes) end()
End building the model.void
manage
(com.badlogic.gdx.utils.Disposable disposable) Add theDisposable
object to the model, causing it to be disposed when the model is disposed.node()
Add a node to the model.protected IntNode
Adds theNode
to the model and sets it active for building.Adds the nodes of the specified model to a new node of the model being build.void
part
(IntMeshPart meshpart, Material material) Adds the specified IntMeshPart to the current Node.part
(String id, int primitiveType, com.badlogic.gdx.graphics.VertexAttributes attributes, Material material) Creates a new IntMeshPart within the current Node and returns aIntMeshPartBuilder
which can be used to build the shape of the part.Creates a new IntMeshPart within the current Node and returns aIntMeshPartBuilder
which can be used to build the shape of the part.Adds the specified mesh part to the current node.Adds the specified mesh part to the current node.static void
rebuildReferences
(IntModel model) Resets the references toMaterial
s,IntMesh
es andIntMeshPart
s within the model to the ones used within it's nodes.
-
Constructor Details
-
IntModelBuilder
public IntModelBuilder()
-
-
Method Details
-
rebuildReferences
Resets the references toMaterial
s,IntMesh
es andIntMeshPart
s within the model to the ones used within it's nodes. This will make the model responsible for disposing all referenced meshes. -
createFromMesh
@Deprecated public static IntModel createFromMesh(IntMesh mesh, int primitiveType, Material material) Deprecated. -
createFromMesh
@Deprecated public static IntModel createFromMesh(IntMesh mesh, int indexOffset, int vertexCount, int primitiveType, Material material) Deprecated. -
createFromMesh
@Deprecated public static IntModel createFromMesh(float[] vertices, com.badlogic.gdx.graphics.VertexAttribute[] attributes, int[] indices, int primitiveType, Material material) Deprecated. -
begin
public void begin()Begin building a new model -
end
End building the model.- Returns:
- The newly created model. Call the
IntModel.dispose()
method when no longer used.
-
node
Adds theNode
to the model and sets it active for building. Use any of the part(...) method to add a NodePart. -
node
Add a node to the model. Use any of the part(...) method to add a NodePart.- Returns:
- The node being created.
-
node
Adds the nodes of the specified model to a new node of the model being build. After this method the given model can no longer be used. Do not call theIntModel.dispose()
method on that model.- Returns:
- The newly created node containing the nodes of the given model.
-
manage
public void manage(com.badlogic.gdx.utils.Disposable disposable) Add theDisposable
object to the model, causing it to be disposed when the model is disposed. -
part
Adds the specified IntMeshPart to the current Node. The Mesh will be managed by the model and disposed when the model is disposed. The resources the Material might contain are not managed, usemanage(Disposable)
to add those to the model. -
part
public IntMeshPart part(String id, IntMesh mesh, int primitiveType, int offset, int size, Material material) Adds the specified mesh part to the current node. The Mesh will be managed by the model and disposed when the model is disposed. The resources the Material might contain are not managed, usemanage(Disposable)
to add those to the model.- Returns:
- The added IntMeshPart.
-
part
Adds the specified mesh part to the current node. The Mesh will be managed by the model and disposed when the model is disposed. The resources the Material might contain are not managed, usemanage(Disposable)
to add those to the model.- Returns:
- The added IntMeshPart.
-
part
public IntMeshPartBuilder part(String id, int primitiveType, com.badlogic.gdx.graphics.VertexAttributes attributes, Material material) Creates a new IntMeshPart within the current Node and returns aIntMeshPartBuilder
which can be used to build the shape of the part. If possible a previously usedIntMeshPartBuilder
will be reused, to reduce the number of mesh binds. Therefore you can only build one part at a time. The resources the Material might contain are not managed, usemanage(Disposable)
to add those to the model.- Returns:
- The
IntMeshPartBuilder
you can use to build the IntMeshPart.
-
part
Creates a new IntMeshPart within the current Node and returns aIntMeshPartBuilder
which can be used to build the shape of the part. If possible a previously usedIntMeshPartBuilder
will be reused, to reduce the number of mesh binds. Therefore you can only build one part at a time. The resources the Material might contain are not managed, usemanage(Disposable)
to add those to the model.- Parameters:
attributes
- bitwise mask of theVertexAttributes.Usage
, only Position, Color, Normal and TextureCoordinates is supported.- Returns:
- The
IntMeshPartBuilder
you can use to build the IntMeshPart.
-
createBox
public IntModel createBox(float width, float height, float depth, Material material, Bits attributes) Convenience method to create a model with a single node containing a box shape. The resources the Material might contain are not managed, useIntModel.manageDisposable(Disposable)
to add those to the model.- Parameters:
attributes
- bitwise mask of theVertexAttributes.Usage
, only Position, Color, Normal and TextureCoordinates is supported.
-
createBox
public IntModel createBox(float width, float height, float depth, int primitiveType, Material material, Bits attributes) Convenience method to create a model with a single node containing a box shape. The resources the Material might contain are not managed, useIntModel.manageDisposable(Disposable)
to add those to the model.- Parameters:
attributes
- bitwise mask of theVertexAttributes.Usage
, only Position, Color, Normal and TextureCoordinates is supported.
-
createRect
public IntModel 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, Bits attributes) Convenience method to create a model with a single node containing a rectangle shape. The resources the Material might contain are not managed, useIntModel.manageDisposable(Disposable)
to add those to the model.- Parameters:
attributes
- bitwise mask of theVertexAttributes.Usage
, only Position, Color, Normal and TextureCoordinates is supported.
-
createRect
public IntModel 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, Bits attributes) Convenience method to create a model with a single node containing a rectangle shape. The resources the Material might contain are not managed, useIntModel.manageDisposable(Disposable)
to add those to the model.- Parameters:
attributes
- bitwise mask of theVertexAttributes.Usage
, only Position, Color, Normal and TextureCoordinates is supported.
-
createCylinder
public IntModel createCylinder(float width, float height, float depth, int divisions, Material material, Bits attributes) Convenience method to create a model with a single node containing a cylinder shape. The resources the Material might contain are not managed, useIntModel.manageDisposable(Disposable)
to add those to the model.- Parameters:
attributes
- bitwise mask of theVertexAttributes.Usage
, only Position, Color, Normal and TextureCoordinates is supported.
-
createCylinder
public IntModel createCylinder(float width, float height, float depth, int divisions, int primitiveType, Material material, Bits attributes) Convenience method to create a model with a single node containing a cylinder shape. The resources the Material might contain are not managed, useIntModel.manageDisposable(Disposable)
to add those to the model.- Parameters:
attributes
- bitwise mask of theVertexAttributes.Usage
, only Position, Color, Normal and TextureCoordinates is supported.
-
createCylinder
public IntModel createCylinder(float width, float height, float depth, int divisions, Material material, Bits attributes, float angleFrom, float angleTo) Convenience method to create a model with a single node containing a cylinder shape. The resources the Material might contain are not managed, useIntModel.manageDisposable(Disposable)
to add those to the model.- Parameters:
attributes
- bitwise mask of theVertexAttributes.Usage
, only Position, Color, Normal and TextureCoordinates is supported.
-
createCylinder
public IntModel createCylinder(float width, float height, float depth, int divisions, int primitiveType, Material material, Bits attributes, float angleFrom, float angleTo) Convenience method to create a model with a single node containing a cylinder shape. The resources the Material might contain are not managed, useIntModel.manageDisposable(Disposable)
to add those to the model.- Parameters:
attributes
- bitwise mask of theVertexAttributes.Usage
, only Position, Color, Normal and TextureCoordinates is supported.
-
createCone
public IntModel createCone(float width, float height, float depth, int divisions, Material material, Bits attributes) Convenience method to create a model with a single node containing a cone shape. The resources the Material might contain are not managed, useIntModel.manageDisposable(Disposable)
to add those to the model.- Parameters:
attributes
- bitwise mask of theVertexAttributes.Usage
, only Position, Color, Normal and TextureCoordinates is supported.
-
createCone
public IntModel createCone(float width, float height, float depth, int divisions, int primitiveType, Material material, Bits attributes) Convenience method to create a model with a single node containing a cone shape. The resources the Material might contain are not managed, useIntModel.manageDisposable(Disposable)
to add those to the model.- Parameters:
attributes
- bitwise mask of theVertexAttributes.Usage
, only Position, Color, Normal and TextureCoordinates is supported.
-
createCone
public IntModel createCone(float width, float height, float depth, int divisions, int hdivisions, int primitiveType, Material material, Bits attributes) Convenience method to create a model with a single node containing a cone shape. The resources the Material might contain are not managed, useIntModel.manageDisposable(Disposable)
to add those to the model.- Parameters:
attributes
- bitwise mask of theVertexAttributes.Usage
, only Position, Color, Normal and TextureCoordinates is supported.
-
createCone
public IntModel createCone(float width, float height, float depth, int divisions, Material material, Bits attributes, float angleFrom, float angleTo) Convenience method to create a model with a single node containing a cone shape. The resources the Material might contain are not managed, useIntModel.manageDisposable(Disposable)
to add those to the model.- Parameters:
attributes
- bitwise mask of theVertexAttributes.Usage
, only Position, Color, Normal and TextureCoordinates is supported.
-
createCone
public IntModel createCone(float width, float height, float depth, int divisions, int primitiveType, Material material, Bits attributes, float angleFrom, float angleTo) Convenience method to create a model with a single node containing a cone shape. The resources the Material might contain are not managed, useIntModel.manageDisposable(Disposable)
to add those to the model.- Parameters:
attributes
- bitwise mask of theVertexAttributes.Usage
, only Position, Color, Normal and TextureCoordinates is supported.
-
createCone
public IntModel createCone(float width, float height, float depth, int divisions, int hdivisions, int primitiveType, Material material, Bits attributes, float angleFrom, float angleTo) Convenience method to create a model with a single node containing a cone shape. The resources the Material might contain are not managed, useIntModel.manageDisposable(Disposable)
to add those to the model.- Parameters:
attributes
- bitwise mask of theVertexAttributes.Usage
, only Position, Color, Normal and TextureCoordinates is supported.
-
createSphere
public IntModel createSphere(float width, float height, float depth, int divisionsU, int divisionsV, Material material, Bits attributes) Convenience method to create a model with a single node containing a sphere shape. The resources the Material might contain are not managed, useIntModel.manageDisposable(Disposable)
to add those to the model.- Parameters:
attributes
- bitwise mask of theVertexAttributes.Usage
, only Position, Color, Normal and TextureCoordinates is supported.
-
createSphere
public IntModel createSphere(float width, float height, float depth, int divisionsU, int divisionsV, int primitiveType, Material material, Bits attributes) Convenience method to create a model with a single node containing a sphere shape. The resources the Material might contain are not managed, useIntModel.manageDisposable(Disposable)
to add those to the model.- Parameters:
attributes
- bitwise mask of theVertexAttributes.Usage
, only Position, Color, Normal and TextureCoordinates is supported.
-
createSphere
public IntModel createSphere(float width, float height, float depth, int divisionsU, int divisionsV, Material material, Bits attributes, float angleUFrom, float angleUTo, float angleVFrom, float angleVTo) Convenience method to create a model with a single node containing a sphere shape. The resources the Material might contain are not managed, useIntModel.manageDisposable(Disposable)
to add those to the model.- Parameters:
attributes
- bitwise mask of theVertexAttributes.Usage
, only Position, Color, Normal and TextureCoordinates is supported.
-
createSphere
public IntModel createSphere(float width, float height, float depth, int divisionsU, int divisionsV, int primitiveType, Material material, Bits attributes, float angleUFrom, float angleUTo, float angleVFrom, float angleVTo) Convenience method to create a model with a single node containing a sphere shape. The resources the Material might contain are not managed, useIntModel.manageDisposable(Disposable)
to add those to the model.- Parameters:
attributes
- bitwise mask of theVertexAttributes.Usage
, only Position, Color, Normal and TextureCoordinates is supported.
-
createCapsule
public IntModel createCapsule(float radius, float height, int divisions, Material material, Bits attributes) Convenience method to create a model with a single node containing a capsule shape. The resources the Material might contain are not managed, useIntModel.manageDisposable(Disposable)
to add those to the model.- Parameters:
attributes
- bitwise mask of theVertexAttributes.Usage
, only Position, Color, Normal and TextureCoordinates is supported.
-
createCapsule
public IntModel createCapsule(float radius, float height, int divisions, int primitiveType, Material material, Bits attributes) Convenience method to create a model with a single node containing a capsule shape. The resources the Material might contain are not managed, useIntModel.manageDisposable(Disposable)
to add those to the model.- Parameters:
attributes
- bitwise mask of theVertexAttributes.Usage
, only Position, Color, Normal and TextureCoordinates is supported.
-
createXYZCoordinates
public IntModel createXYZCoordinates(float axisLength, float capLength, float stemThickness, int divisions, int primitiveType, Material material, Bits attributes) Convenience method to create a model with three orthonormal vectors shapes. The resources the Material might contain are not managed, useIntModel.manageDisposable(Disposable)
to add those to the model.- Parameters:
axisLength
- Length of each axis.capLength
- is the height of the cap in percentage, must be in (0,1)stemThickness
- is the percentage of stem diameter compared to cap diameter, must be in (0,1]divisions
- the amount of vertices used to generate the cap and stem ellipsoidal bases
-
createXYZCoordinates
-
createPlane
-
createPlane
-
createArrow
public IntModel createArrow(float x1, float y1, float z1, float x2, float y2, float z2, float capLength, float stemThickness, int divisions, int primitiveType, Material material, Bits attributes) Convenience method to create a model with an arrow. The resources the Material might contain are not managed, useIntModel.manageDisposable(Disposable)
to add those to the model.- Parameters:
capLength
- 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 basesmaterial
-
-
createArrow
public IntModel createArrow(com.badlogic.gdx.math.Vector3 from, com.badlogic.gdx.math.Vector3 to, Material material, Bits attributes) Convenience method to create a model with an arrow. The resources the Material might contain are not managed, useIntModel.manageDisposable(Disposable)
to add those to the model. -
createLineGrid
public IntModel createLineGrid(int xDivisions, int zDivisions, float xSize, float zSize, Material material, Bits attributes) Convenience method to create a model which represents a grid of lines on the XZ plane. The resources the Material might contain are not managed, useIntModel.manageDisposable(Disposable)
to add those to the model.- Parameters:
xDivisions
- row count along x axis.zDivisions
- row count along z axis.xSize
- Length of a single row on x.zSize
- Length of a single row on z.
-
createCylinder
public IntModel createCylinder(float width, float height, float depth, int divisions, boolean flipNormals, Material material, Bits attributes) Convenience method to create a model with a single node containing a cylinder shape. The resources the Material might contain are not managed, useIntModel.manageDisposable(Disposable)
to add those to the model.- Parameters:
attributes
- bitwise mask of theVertexAttributes.Usage
, only Position, Color, Normal and TextureCoordinates is supported.
-
createCylinder
public IntModel createCylinder(float width, float height, float depth, int divisions, boolean flipNormals, int primitiveType, Material material, Bits attributes) Convenience method to create a model with a single node containing a cylinder shape. The resources the Material might contain are not managed, useIntModel.manageDisposable(Disposable)
to add those to the model.- Parameters:
attributes
- bitwise mask of theVertexAttributes.Usage
, only Position, Color, Normal and TextureCoordinates is supported.
-
createIcoSphere
public IntModel createIcoSphere(float radius, int recursion, boolean flipNormals, boolean hardEdges, Material material, Bits attributes) Convenience method to create a model with a single node containing an ico-sphere shape. The resources the Material might contain are not managed, useIntModel.manageDisposable(Disposable)
to add those to the model.- Parameters:
attributes
- bitwise mask of theVertexAttributes.Usage
, only Position, Color, Normal and TextureCoordinates is supported.
-
createIcoSphere
-
createOctahedronSphere
public IntModel createOctahedronSphere(float radius, int divisions, boolean flipNormals, boolean hardEdges, Material material, Bits attributes) Convenience method to create a model with a single node containing an octahedron-sphere shape. The resources the Material might contain are not managed, useIntModel.manageDisposable(Disposable)
to add those to the model.- Parameters:
attributes
- bitwise mask of theVertexAttributes.Usage
, only Position, Color, Normal and TextureCoordinates is supported.
-
createOctahedronSphere
public IntModel createOctahedronSphere(float radius, int divisions, boolean flipNormals, boolean hardEdges, int primitiveType, Material material, Bits attributes) Creates an octahedron-sphere- Returns:
- The model
-
createRing
public IntModel createRing(float sphereDiameter, int divisionsU, int divisionsV, float innerRingRadius, float outerRingRadius, int ringDivisions, int primitiveType, Material materialShpere, Material materialRing, Bits attributes) Convenience method to create a ring model. The resources the Materials might contain are not managed, useIntModel.manageDisposable(Disposable)
to add those to the model.- Parameters:
attributes
- bitwise mask of theVertexAttributes.Usage
, only Position, Color, Normal and TextureCoordinates is supported.
-
createSphereRing
public IntModel createSphereRing(float sphereDiameter, int divisionsU, int divisionsV, float innerRingRadius, float outerRingRadius, int ringDivisions, int primitiveType, Material materialShpere, Material materialRing, Bits attributes) Convenience method to create a sphere with a ring. Useful for ringed planets such as Saturn. The resources the Materials might contain are not managed, useIntModel.manageDisposable(Disposable)
to add those to the model.- Parameters:
attributes
- bitwise mask of theVertexAttributes.Usage
, only Position, Color, Normal and TextureCoordinates is supported.
-
createSphere
public IntModel createSphere(float diameter, int divisionsU, int divisionsV, Material material, Bits attributes) Convenience method to create a model with a single node containing a sphere shape. The resources the Material might contain are not managed, useIntModel.manageDisposable(Disposable)
to add those to the model.- Parameters:
attributes
- bitwise mask of theVertexAttributes.Usage
, only Position, Color, Normal and TextureCoordinates is supported.
-
createSphere
public IntModel createSphere(float diameter, int divisionsU, int divisionsV, boolean flipNormals, Material material, Bits attributes) Convenience method to create a model with a single node containing a sphere shape. The resources the Material might contain are not managed, useIntModel.manageDisposable(Disposable)
to add those to the model.- Parameters:
attributes
- bitwise mask of theVertexAttributes.Usage
, only Position, Color, Normal and TextureCoordinates is supported.
-
createSphere
public IntModel createSphere(float width, float height, float depth, int divisionsU, int divisionsV, boolean flipNormals, Material material, Bits attributes) Convenience method to create a model with a single node containing a sphere shape. The resources the Material might contain are not managed, useIntModel.manageDisposable(Disposable)
to add those to the model.- Parameters:
attributes
- bitwise mask of theVertexAttributes.Usage
, only Position, Color, Normal and TextureCoordinates is supported.
-
createSphere
public IntModel createSphere(float width, float height, float depth, int divisionsU, int divisionsV, boolean flipNormals, int primitiveType, Material material, Bits attributes) Convenience method to create a model with a single node containing a sphere shape. The resources the Material might contain are not managed, useIntModel.manageDisposable(Disposable)
to add those to the model.- Parameters:
attributes
- bitwise mask of theVertexAttributes.Usage
, only Position, Color, Normal and TextureCoordinates is supported.
-
createSphere
public IntModel createSphere(float width, float height, float depth, int divisionsU, int divisionsV, boolean flipNormals, Material material, Bits attributes, float angleUFrom, float angleUTo, float angleVFrom, float angleVTo) Convenience method to create a model with a single node containing a sphere shape. The resources the Material might contain are not managed, useIntModel.manageDisposable(Disposable)
to add those to the model.- Parameters:
attributes
- bitwise mask of theVertexAttributes.Usage
, only Position, Color, Normal and TextureCoordinates is supported.
-
createSphere
public IntModel createSphere(float width, float height, float depth, int divisionsU, int divisionsV, boolean flipNormals, int primitiveType, Material material, Bits attributes, float angleUFrom, float angleUTo, float angleVFrom, float angleVTo) Convenience method to create a model with a single node containing a sphere shape. The resources the Material might contain are not managed, useIntModel.manageDisposable(Disposable)
to add those to the model.- Parameters:
attributes
- bitwise mask of theVertexAttributes.Usage
, only Position, Color, Normal and TextureCoordinates is supported.
-