Class AllHitCollideShapeBodyCollector

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

public class AllHitCollideShapeBodyCollector extends CollideShapeBodyCollector
Collect all results from a broadphase shape collision. (native type: AllHitCollisionCollector<CollideShapeBodyCollector>)
  • Constructor Details

    • AllHitCollideShapeBodyCollector

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

    • countHits

      public int countHits()
      Count the hits.
      Returns:
      the count (≥0)
    • get

      public int get(int index)
      Return the body ID of the hit with the specified index. (native attribute: mHits)
      Parameters:
      index - (≥0, <numHits)
      Returns:
      the BodyID value
    • getHits

      public int[] getHits()
      Copy all the hits to an array. (native attribute: mHits)
      Returns:
      a new array of body IDs