Package com.github.stephengold.joltjni
Class AllHitTransformedShapeCollector
java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.TransformedShapeCollector
com.github.stephengold.joltjni.AllHitTransformedShapeCollector
- All Implemented Interfaces:
ConstJoltPhysicsObject
,AutoCloseable
,Comparable<JoltPhysicsObject>
Collect all leaf shapes from a transformed shape or narrow-phase query.
(native type:
AllHitCollisionCollector<TransformedShapeCollector>
)-
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
-
AllHitTransformedShapeCollector
public AllHitTransformedShapeCollector()Instantiate a default collector.
-
-
Method Details
-
countHits
public int countHits()Count the leaf shapes.- Returns:
- the count (≥0)
-
get
Access the leaf shape with the specified index.- Parameters:
index
- (≥0, <numHits)- Returns:
- a new object
-
getHits
Access all the leaf shapes as an array. (native attribute: mHits)- Returns:
- a new list of new objects
-