remove2 method
Implementation
bool remove2(B searchBounds, AbstractNode<B> node, T item) {
bool found = removeItem(node, item);
if (found) {
return true;
}
AbstractNode<B>? childToPrune;
for (var childBoundable in node.getChildBoundables()) {
if (!getIntersectsOp().intersects(childBoundable.getBounds(), searchBounds)) {
continue;
}
if (childBoundable is AbstractNode<B>) {
found = remove2(searchBounds, childBoundable, item);
if (found) {
childToPrune = childBoundable;
break;
}
}
}
if (childToPrune != null) {
if (childToPrune.getChildBoundables().isEmpty) {
node.getChildBoundables().remove(childToPrune);
}
}
return found;
}