findNearbyParticlesToOutput method

void findNearbyParticlesToOutput(
  1. double x,
  2. double y,
  3. double searchRadius,
  4. List<int> output,
)

Finds nearby particles using circular query and fills the given list. output: List to fill with found particle indices.

Implementation

void findNearbyParticlesToOutput(
    double x, double y, double searchRadius, List<int> output) {
  final List<QuadTreeParticle> found = [];
  _root.queryCircle(x, y, searchRadius, found);
  for (var i = 0; i < found.length; i++) {
    output.add(found[i].index);
  }
}