Class AllHitCastShapeCollector

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

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

    • AllHitCastShapeCollector

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

    • get

      public ShapeCastResult 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<ShapeCastResult> 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.