Package com.github.stephengold.joltjni
Class TwoBodyConstraintSettingsRef
java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.template.Ref
com.github.stephengold.joltjni.TwoBodyConstraintSettingsRef
- All Implemented Interfaces:
ConstJoltPhysicsObject,AutoCloseable,Comparable<JoltPhysicsObject>
A counted reference to a
TwoBodyConstraintSettings object. (native
type: Ref<TwoBodyConstraintSettings>)-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreate a constraint using the settings.getPtr()Temporarily access the referencedTwoBodyConstraintSettings.longtargetVa()Return the address of the nativeTwoBodyConstraintSettings.toRef()Create another counted reference to the nativeTwoBodyConstraintSettings.Methods inherited from class com.github.stephengold.joltjni.JoltPhysicsObject
close, compareTo, equals, getContainingObject, hasAssignedNativeObject, hashCode, isCleanerStarted, ownsNativeObject, setVirtualAddress, setVirtualAddress, startCleaner, toString, va
-
Constructor Details
-
TwoBodyConstraintSettingsRef
public TwoBodyConstraintSettingsRef()Instantiate an empty reference.
-
-
Method Details
-
create
Create a constraint using the settings. The settings are unaffected.- Parameters:
rigidBody1- the desired first body (not null, not soft)rigidBody2- the desired 2nd body (not null, not soft)- Returns:
- the new constraint, ready to be added to a
PhysicsSystem
-
getPtr
Temporarily access the referencedTwoBodyConstraintSettings. -
targetVa
public long targetVa()Return the address of the nativeTwoBodyConstraintSettings. No objects are affected.- Specified by:
targetVain interfaceConstJoltPhysicsObject- Overrides:
targetVain classJoltPhysicsObject- Returns:
- a virtual address (not zero)
-
toRef
Create another counted reference to the nativeTwoBodyConstraintSettings.
-