Class AllHitCastRayCollector

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

public class AllHitCastRayCollector extends CastRayCollector
Collect all results from a narrow-phase ray-cast query. (native type: AllHitCollisionCollector<CastRayCollector>)
  • Constructor Details

    • AllHitCastRayCollector

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

    • get

      public RayCastResult get(int index)
      Access the hit with the specified index.
      Parameters:
      index - (≥0, <numHits)
      Returns:
      a new JVM object with the pre-existing native object assigned
    • getHits

      public List<RayCastResult> getHits()
      Access all the hits as a list. (native attribute: mHits)
      Returns:
      a new list of new JVM objects with pre-existing native objects assigned
    • sort

      public void sort()
      Sort the hits.