Class AllHitTransformedShapeCollector

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

public class AllHitTransformedShapeCollector extends TransformedShapeCollector
Collect all leaf shapes from a transformed shape or narrow-phase query. (native type: AllHitCollisionCollector<TransformedShapeCollector>)
  • Constructor Details

    • AllHitTransformedShapeCollector

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

    • countHits

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

      public ConstTransformedShape get(int index)
      Access the leaf shape with the specified index.
      Parameters:
      index - (≥0, <numHits)
      Returns:
      a new object
    • getHits

      public List<ConstTransformedShape> getHits()
      Access all the leaf shapes as an array. (native attribute: mHits)
      Returns:
      a new list of new objects