Class AllHitCollideShapeCollector

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

public class AllHitCollideShapeCollector extends CollideShapeCollector
Collect all results from a narrow-phase shape collision. (native type: AllHitCollisionCollector<CollideShapeCollector>)
  • Constructor Details

    • AllHitCollideShapeCollector

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

    • get

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

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

      public void sort()
      Sort the hits.