private void Query(object searchBounds, AbstractNode node, ISpatialIndexVisitor visitor) { for (IEnumerator i = node.ChildBoundables.GetEnumerator(); i.MoveNext();) { IBoundable childBoundable = (IBoundable)i.Current; if (!GetIntersectsOp().Intersects(childBoundable.Bounds, searchBounds)) { continue; } if (childBoundable is AbstractNode) { Query(searchBounds, (AbstractNode)childBoundable, visitor); } else if (childBoundable is ItemBoundable) { visitor.VisitItem(((ItemBoundable)childBoundable).Item); } else { Debug.Assert(true); } } }
private void VisitItems(Envelope searchEnv, ISpatialIndexVisitor visitor) { // would be nice to filter items based on search envelope, but can't until they contain an envelope for (IEnumerator i = m_arrItems.GetEnumerator(); i.MoveNext();) { visitor.VisitItem(i.Current); } }