Package com.github.stephengold.joltjni
Class AllHitCollideShapeBodyCollector
java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.CollideShapeBodyCollector
com.github.stephengold.joltjni.AllHitCollideShapeBodyCollector
- All Implemented Interfaces:
ConstJoltPhysicsObject
,AutoCloseable
,Comparable<JoltPhysicsObject>
Collect all results from a broadphase shape collision. (native type:
AllHitCollisionCollector<CollideShapeBodyCollector>
)-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.github.stephengold.joltjni.JoltPhysicsObject
close, compareTo, equals, getContainingObject, hasAssignedNativeObject, hashCode, ownsNativeObject, setVirtualAddress, setVirtualAddress, startCleaner, targetVa, toString, va
-
Constructor Details
-
AllHitCollideShapeBodyCollector
public AllHitCollideShapeBodyCollector()Instantiate a default collector.
-
-
Method Details
-
countHits
public int countHits()Count the hits.- Returns:
- the count (≥0)
-
get
public int get(int index) Return the body ID of the hit with the specified index. (native attribute: mHits)- Parameters:
index
- (≥0, <numHits)- Returns:
- the
BodyID
value
-
getHits
public int[] getHits()Copy all the hits to an array. (native attribute: mHits)- Returns:
- a new array of body IDs
-