query method

Map<int, List<T>> query(
  1. T value
)

Implementation

Map<int, List<T>> query(T value) {
  final node = _hitboxAtNode[value as ShapeHitbox];
  var id = -1;
  final values = <T>[];
  if (node == null) {
    throw '$node not found';
  }
  id = node.id;
  values.addAll(node.hitboxes as List<T>);
  values.addAll(_getChildrenItems(node));
  values.addAll(_getParentItems(node));
  return {id: values};
}