queryRange method
Queries particles within a rectangular range.
Returns list of particle indices within the range.
Mathematical Operation:
- Rectangle-rectangle intersection test at each node.
- Recursively checks child nodes that intersect the query area.
Implementation
List<int> queryRange(Rectangle range) {
return _root.queryRange(range).map((p) => p.index).toList();
}