Class ClosestHitCollideShapeCollector

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

public class ClosestHitCollideShapeCollector extends CollideShapeCollector
Collect the closest result from a narrow-phase collide-shape query. (native type: ClosestHitCollisionCollector<CollideShapeCollector>)
  • Constructor Details

    • ClosestHitCollideShapeCollector

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

    • getHit

      public CollideShapeResult getHit()
      Access the result of the latest query. (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, otherwise false