query method

List<T> query(
  1. AABB bounds
)

Implementation

List<T> query(AABB bounds) {
  _queryResult.clear();
  _querySeen.clear();

  _forEachCell(bounds, (key) {
    final cell = _cells[key];
    if (cell == null) return;
    for (final obj in cell) {
      if (_querySeen.add(obj)) {
        _queryResult.add(obj);
      }
    }
  });

  return _queryResult;
}