public static class RTNode.Search<T extends RTBounds>
extends java.lang.Object
implements java.util.Iterator<T>
For example, here is the code to search cell "myCell" in the area "bounds" (in database coordinates):
for(RTNode.Searchsea = new RTNode.Search(bounds, cell); sea.hasNext(); ) { Geometric geom = sea.next(); if (geom instanceof NodeInst) { NodeInst ni = (NodeInst)geom; // process NodeInst ni in the selected area } else { ArcInst ai = (ArcInst)geom; // process ArcInst ai in the selected area } }
Constructor and Description |
---|
RTNode.Search(java.awt.geom.Rectangle2D bounds,
RTNode<T> root,
boolean includeEdges)
Constructor to build an R-Tree search iterator.
|
RTNode.Search(RTNode<T> root)
Constructor to build an R-Tree search iterator that finds everything in the tree.
|
public RTNode.Search(java.awt.geom.Rectangle2D bounds, RTNode<T> root, boolean includeEdges)
bounds
- the bounds of the search.root
- the root of the R-Tree.includeEdges
- true to include edges of the bounds in the search.