Package com.github.stephengold.joltjni
Class ClosestHitCastRayCollector
java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.CastRayCollector
com.github.stephengold.joltjni.ClosestHitCastRayCollector
- All Implemented Interfaces:
ConstJoltPhysicsObject
,AutoCloseable
,Comparable<JoltPhysicsObject>
Collect the closest result from a narrow-phase ray-cast query. (native type:
ClosestHitCollisionCollector<CastRayCollector>
)-
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
-
ClosestHitCastRayCollector
public ClosestHitCastRayCollector()Instantiate a default collector.
-
-
Method Details
-
getHit
Access the result of the latest query. The collector is unaffected. (native field: mHit)- 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
-