Class PhysicsMaterialRefC

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

public final class PhysicsMaterialRefC extends JoltPhysicsObject
A counted reference to a ConstPhysicsMaterial. (native type: RefConst<PhysicsMaterial>)
  • Constructor Details

    • PhysicsMaterialRefC

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

    • getPtr

      public ConstPhysicsMaterial getPtr()
      Access the targeted material, if any.
      Returns:
      the pre-existing object, or null if the reference is empty
    • targetVa

      public long targetVa()
      Return the address of the native material. 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 material. 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