destroyParticlesInShape method
Destroy particles inside a shape. In addition, this function immediately destroys particles in the shape in contrast to DestroyParticle() which defers the destruction until the next simulation step.
Implementation
void destroyParticlesInShape(
Shape shape,
Transform xf, {
bool callDestructionListener = false,
}) {
final callback = DestroyParticlesInShapeCallback(
this,
shape,
xf,
callDestructionListener: callDestructionListener,
);
shape.computeAABB(_temp, xf, 0);
world.queryAABBParticle(callback, _temp);
}