Class TwoBodyConstraintSettingsRef

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

public final class TwoBodyConstraintSettingsRef extends Ref
A counted reference to a TwoBodyConstraintSettings object. (native type: Ref<TwoBodyConstraintSettings>)
  • Constructor Details

    • TwoBodyConstraintSettingsRef

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

    • create

      public TwoBodyConstraint create(Body body1, Body body2)
      Create a constraint using the settings. The settings are unaffected.
      Parameters:
      body1 - the desired first body (not null)
      body2 - the desired 2nd body (not null)
      Returns:
      a new constraint
    • getPtr

      public TwoBodyConstraintSettings getPtr()
      Temporarily access the referenced TwoBodyConstraintSettings.
      Specified by:
      getPtr in class Ref
      Returns:
      a new JVM object with the pre-existing native object assigned
    • targetVa

      public long targetVa()
      Return the address of the native TwoBodyConstraintSettings. No objects are affected.
      Specified by:
      targetVa in interface ConstJoltPhysicsObject
      Overrides:
      targetVa in class JoltPhysicsObject
      Returns:
      a virtual address (not zero)
    • toRef

      Create another counted reference to the native TwoBodyConstraintSettings.
      Specified by:
      toRef in class Ref
      Returns:
      a new JVM object with a new native object assigned