Class IntModelBuilder

java.lang.Object
gaiasky.util.gdx.IntModelBuilder

public class IntModelBuilder extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Begin building a new model
    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.
    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.
    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.
    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-sphere
    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.
    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 the Disposable object to the model, causing it to be disposed when the model is disposed.
    Add a node to the model.
    protected IntNode
    node(IntNode node)
    Adds the Node to the model and sets it active for building.
    node(String id, IntModel model)
    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 a IntMeshPartBuilder which can be used to build the shape of the part.
    part(String id, int primitiveType, Bits attributes, Material material)
    Creates a new IntMeshPart within the current Node and returns a IntMeshPartBuilder which can be used to build the shape of the part.
    part(String id, IntMesh mesh, int primitiveType, int offset, int size, Material material)
    Adds the specified mesh part to the current node.
    part(String id, IntMesh mesh, int primitiveType, Material material)
    Adds the specified mesh part to the current node.
    static void
    Resets the references to Materials, IntMeshes and IntMeshParts within the model to the ones used within it's nodes.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • IntModelBuilder

      public IntModelBuilder()
  • Method Details

    • rebuildReferences

      public static void rebuildReferences(IntModel model)
      Resets the references to Materials, IntMeshes and IntMeshParts 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

      public IntModel end()
      End building the model.
      Returns:
      The newly created model. Call the IntModel.dispose() method when no longer used.
    • node

      protected IntNode node(IntNode node)
      Adds the Node to the model and sets it active for building. Use any of the part(...) method to add a NodePart.
    • node

      public IntNode node()
      Add a node to the model. Use any of the part(...) method to add a NodePart.
      Returns:
      The node being created.
    • node

      public IntNode node(String id, IntModel model)
      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 the IntModel.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 the Disposable object to the model, causing it to be disposed when the model is disposed.
    • part

      public void part(IntMeshPart meshpart, Material material)
      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, use manage(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, use manage(Disposable) to add those to the model.
      Returns:
      The added IntMeshPart.
    • part

      public IntMeshPart part(String id, IntMesh mesh, int primitiveType, 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, use manage(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 a IntMeshPartBuilder which can be used to build the shape of the part. If possible a previously used IntMeshPartBuilder 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, use manage(Disposable) to add those to the model.
      Returns:
      The IntMeshPartBuilder you can use to build the IntMeshPart.
    • part

      public IntMeshPartBuilder part(String id, int primitiveType, Bits attributes, Material material)
      Creates a new IntMeshPart within the current Node and returns a IntMeshPartBuilder which can be used to build the shape of the part. If possible a previously used IntMeshPartBuilder 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, use manage(Disposable) to add those to the model.
      Parameters:
      attributes - bitwise mask of the VertexAttributes.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, use IntModel.manageDisposable(Disposable) to add those to the model.
      Parameters:
      attributes - bitwise mask of the VertexAttributes.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, use IntModel.manageDisposable(Disposable) to add those to the model.
      Parameters:
      attributes - bitwise mask of the VertexAttributes.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, use IntModel.manageDisposable(Disposable) to add those to the model.
      Parameters:
      attributes - bitwise mask of the VertexAttributes.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, use IntModel.manageDisposable(Disposable) to add those to the model.
      Parameters:
      attributes - bitwise mask of the VertexAttributes.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, use IntModel.manageDisposable(Disposable) to add those to the model.
      Parameters:
      attributes - bitwise mask of the VertexAttributes.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, use IntModel.manageDisposable(Disposable) to add those to the model.
      Parameters:
      attributes - bitwise mask of the VertexAttributes.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, use IntModel.manageDisposable(Disposable) to add those to the model.
      Parameters:
      attributes - bitwise mask of the VertexAttributes.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, use IntModel.manageDisposable(Disposable) to add those to the model.
      Parameters:
      attributes - bitwise mask of the VertexAttributes.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, use IntModel.manageDisposable(Disposable) to add those to the model.
      Parameters:
      attributes - bitwise mask of the VertexAttributes.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, use IntModel.manageDisposable(Disposable) to add those to the model.
      Parameters:
      attributes - bitwise mask of the VertexAttributes.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, use IntModel.manageDisposable(Disposable) to add those to the model.
      Parameters:
      attributes - bitwise mask of the VertexAttributes.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, use IntModel.manageDisposable(Disposable) to add those to the model.
      Parameters:
      attributes - bitwise mask of the VertexAttributes.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, use IntModel.manageDisposable(Disposable) to add those to the model.
      Parameters:
      attributes - bitwise mask of the VertexAttributes.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, use IntModel.manageDisposable(Disposable) to add those to the model.
      Parameters:
      attributes - bitwise mask of the VertexAttributes.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, use IntModel.manageDisposable(Disposable) to add those to the model.
      Parameters:
      attributes - bitwise mask of the VertexAttributes.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, use IntModel.manageDisposable(Disposable) to add those to the model.
      Parameters:
      attributes - bitwise mask of the VertexAttributes.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, use IntModel.manageDisposable(Disposable) to add those to the model.
      Parameters:
      attributes - bitwise mask of the VertexAttributes.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, use IntModel.manageDisposable(Disposable) to add those to the model.
      Parameters:
      attributes - bitwise mask of the VertexAttributes.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, use IntModel.manageDisposable(Disposable) to add those to the model.
      Parameters:
      attributes - bitwise mask of the VertexAttributes.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, use IntModel.manageDisposable(Disposable) to add those to the model.
      Parameters:
      attributes - bitwise mask of the VertexAttributes.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, use IntModel.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

      public IntModel createXYZCoordinates(float axisLength, Material material, Bits attributes)
    • createPlane

      public IntModel createPlane(float side, int divisionsU, int divisionsV, boolean flip, int primitiveType, Material material, Bits attributes)
    • createPlane

      public IntModel createPlane(float width, float height, int divisionsU, int divisionsV, boolean flip, int primitiveType, Material material, Bits attributes)
    • 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, use IntModel.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 bases
      material -
    • 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, use IntModel.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, use IntModel.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, use IntModel.manageDisposable(Disposable) to add those to the model.
      Parameters:
      attributes - bitwise mask of the VertexAttributes.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, use IntModel.manageDisposable(Disposable) to add those to the model.
      Parameters:
      attributes - bitwise mask of the VertexAttributes.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, use IntModel.manageDisposable(Disposable) to add those to the model.
      Parameters:
      attributes - bitwise mask of the VertexAttributes.Usage, only Position, Color, Normal and TextureCoordinates is supported.
    • createIcoSphere

      public IntModel createIcoSphere(float radius, int recursion, boolean flipNormals, boolean hardEdges, int primitiveType, Material material, Bits attributes)
    • 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, use IntModel.manageDisposable(Disposable) to add those to the model.
      Parameters:
      attributes - bitwise mask of the VertexAttributes.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, use IntModel.manageDisposable(Disposable) to add those to the model.
      Parameters:
      attributes - bitwise mask of the VertexAttributes.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, use IntModel.manageDisposable(Disposable) to add those to the model.
      Parameters:
      attributes - bitwise mask of the VertexAttributes.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, use IntModel.manageDisposable(Disposable) to add those to the model.
      Parameters:
      attributes - bitwise mask of the VertexAttributes.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, use IntModel.manageDisposable(Disposable) to add those to the model.
      Parameters:
      attributes - bitwise mask of the VertexAttributes.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, use IntModel.manageDisposable(Disposable) to add those to the model.
      Parameters:
      attributes - bitwise mask of the VertexAttributes.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, use IntModel.manageDisposable(Disposable) to add those to the model.
      Parameters:
      attributes - bitwise mask of the VertexAttributes.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, use IntModel.manageDisposable(Disposable) to add those to the model.
      Parameters:
      attributes - bitwise mask of the VertexAttributes.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, use IntModel.manageDisposable(Disposable) to add those to the model.
      Parameters:
      attributes - bitwise mask of the VertexAttributes.Usage, only Position, Color, Normal and TextureCoordinates is supported.