All Implemented Interfaces:
ConstJoltPhysicsObject, RefTarget, AutoCloseable, Comparable<JoltPhysicsObject>

public class Geometry extends JoltPhysicsObject implements RefTarget
Triangle batches for multiple levels of detail. (native type: DebugRenderer::Geometry)
  • Constructor Details

    • Geometry

      public Geometry(ConstAaBox bounds)
      Instantiate a geometry with the specified bounding box.
      Parameters:
      bounds - the desired bounding box (not null, unaffected)
  • Method Details

    • countLods

      public int countLods()
      Return the number of levels of detail. The geometry is unaffected. (native member: mLODs)
      Returns:
      the count (≥0)
    • getBounds

      public ConstAaBox getBounds()
      Access the bounding box. The geometry is unaffected. (native field: mBounds)
      Returns:
      a new JVM object the pre-existing native object assigned
    • getLod

      public ConstLod getLod(int index)
      Access the specified level of detail. The geometry is unaffected. (native field: mLODs)
      Parameters:
      index - the index of the level (≥0)
      Returns:
      a new JVM object with the pre-existing native object assigned
    • getLod

      public ConstLod getLod(Vec3Arg cameraPosition, ConstAaBox worldSpaceBounds, float lodScaleSq)
      Access the appropriate level of detail for the specified conditions. The geometry is unaffected. (native method: GetLOD)
      Parameters:
      cameraPosition - the location of the camera (not null, unaffected)
      worldSpaceBounds - bounds for this geometry (in system coordinates, not null, unaffected)
      lodScaleSq - the squared scale of the model matrix
      Returns:
      a pre-existing LOD
    • getLods

      public ConstLod[] getLods()
      Access all the levels of detail. The geometry is unaffected.
      Returns:
      a new array of new JVM objects with pre-existing native objects assigned
    • getRefCount

      public int getRefCount()
      Count the active references to the native Geometry. The geometry is unaffected.
      Specified by:
      getRefCount in interface RefTarget
      Returns:
      the count (≥0)
    • setEmbedded

      public void setEmbedded()
      Mark the native Geometry as embedded.
      Specified by:
      setEmbedded in interface RefTarget
    • toRef

      public Ref toRef()
      Create a counted reference to the native Geometry.
      Specified by:
      toRef in interface RefTarget
      Returns:
      a new JVM object with a new native object assigned