Class AnyHitCastRayCollector

All Implemented Interfaces:
ConstJoltPhysicsObject, AutoCloseable, Comparable<JoltPhysicsObject>

public class AnyHitCastRayCollector extends CastRayCollector
Collect one result from a narrow-phase ray-cast query. (native type: AnyHitCollisionCollector<CastRayCollector>)
  • Constructor Details

    • AnyHitCastRayCollector

      public AnyHitCastRayCollector()
      Instantiate a default collector.
  • Method Details

    • getHit

      public RayCastResult 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, otherwise false