Package com.github.stephengold.joltjni
Class AnyHitCastShapeCollector
java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.CastShapeCollector
com.github.stephengold.joltjni.AnyHitCastShapeCollector
- All Implemented Interfaces:
ConstJoltPhysicsObject
,AutoCloseable
,Comparable<JoltPhysicsObject>
Collect one result from a narrow-phase shape-cast query. (native type:
AnyHitCollisionCollector<CastShapeCollector>
)-
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
-
AnyHitCastShapeCollector
public AnyHitCastShapeCollector()Instantiate a default collector.
-
-
Method Details
-
getHit
Access the hit result.- Returns:
- a new JVM object with the pre-existing native object assigned
-
hadHit
public boolean hadHit()Test whether the latest query resulted in a hit. The collector is unaffected.- Returns:
true
if there was a hit, otherwisefalse
-