Package com.github.stephengold.joltjni
Class BodyLockMultiBase
java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.NonCopyable
com.github.stephengold.joltjni.BodyLockMultiBase
- All Implemented Interfaces:
ConstJoltPhysicsObject
,AutoCloseable
,Comparable<JoltPhysicsObject>
- Direct Known Subclasses:
BodyLockMultiRead
,BodyLockMultiWrite
Lock multiple bodies.
-
Method Summary
Methods inherited from class com.github.stephengold.joltjni.JoltPhysicsObject
close, compareTo, equals, getContainingObject, hasAssignedNativeObject, hashCode, isCleanerStarted, ownsNativeObject, setVirtualAddress, setVirtualAddress, startCleaner, targetVa, toString, va
-
Method Details
-
getBodies
Access all the bodies.- Returns:
- a new array
-
getBody
Access a specific body.- Parameters:
index
- into the array of body IDs (≥0)- Returns:
- a new JVM object with the pre-existing native object assigned, or
null
if not available
-
getNumBodies
public abstract int getNumBodies()Count the bodies that were locked.- Returns:
- the number of bodies (≥0)
-
releaseLocks
public abstract void releaseLocks()Release all the locks.
-