Class ShapeSettingsRefC

java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.ShapeSettingsRefC
All Implemented Interfaces:
ConstJoltPhysicsObject, ConstSerializableObject, ConstShapeSettings, AutoCloseable, Comparable<JoltPhysicsObject>

public final class ShapeSettingsRefC extends JoltPhysicsObject implements ConstShapeSettings
A counted reference to a ConstShapeSettings. (native type: RefConst<ShapeSettings>)
  • Constructor Details

    • ShapeSettingsRefC

      public ShapeSettingsRefC()
      Instantiate an empty reference.
  • Method Details

    • getPtr

      public ConstShapeSettings getPtr()
      Access the targeted settings, if any.
      Returns:
      the pre-existing object, or null if the reference is empty
    • create

      public ShapeResult create()
      Generate a ShapeResult from these settings.
      Specified by:
      create in interface ConstShapeSettings
      Returns:
      a new JVM object with a new native object assigned
    • getRefCount

      public int getRefCount()
      Count the active references to the native ShapeSettings. The settings are unaffected.
      Specified by:
      getRefCount in interface ConstShapeSettings
      Returns:
      the count (≥0)
    • getRtti

      public Rtti getRtti()
      Access the run-time type information of the current object.
      Specified by:
      getRtti in interface ConstSerializableObject
      Returns:
      a new object
    • toRefC

      public ShapeSettingsRefC toRefC()
      Create another read-only counted reference to the targeted settings.
      Specified by:
      toRefC in interface ConstShapeSettings
      Returns:
      a new JVM object with a new native object assigned
    • targetVa

      public long targetVa()
      Return the address of the native settings. The reference is assumed to be non-empty. No objects are affected.
      Specified by:
      targetVa in interface ConstJoltPhysicsObject
      Overrides:
      targetVa in class JoltPhysicsObject
      Returns:
      the virtual address (not zero)
    • targetVaOrZero

      public long targetVaOrZero()
      Return the address of the native settings. No objects are affected.
      Specified by:
      targetVaOrZero in interface ConstJoltPhysicsObject
      Overrides:
      targetVaOrZero in class JoltPhysicsObject
      Returns:
      the virtual address, or zero if the reference is empty