public class QuadTree<T> extends BoxTree<BoxTree.BoxItem<T>,T> implements SpatialIndex<T>
BoxTree.BoxItem<T>, BoxTree.BoxNode<T extends BoxTree.BoxItem<?>>, BoxTree.SearchBoxCb<T extends BoxTree.BoxItem<?>>, BoxTree.SearchNodeCb<E extends BoxTree.BoxNode<?>>, BoxTree.Visitor<T>SpatialIndex.SearchCb<T>| Constructor and Description |
|---|
QuadTree(int extents,
int maxDepth) |
| Modifier and Type | Method and Description |
|---|---|
void |
insert(Box box,
T item) |
boolean |
remove(Box box,
T item) |
java.util.List<T> |
search(Box bbox,
java.util.List<T> results) |
boolean |
search(Box bbox,
SpatialIndex.SearchCb<T> cb,
java.lang.Object context) |
java.util.List<T> |
searchKNearestNeighbors(Point center,
int k,
double maxDistance,
java.util.List<T> results) |
void |
searchKNearestNeighbors(Point center,
int k,
double maxDistance,
SpatialIndex.SearchCb<T> cb,
java.lang.Object context) |
clear, clearToPool, collect, create, create, getNode, insert, remove, removeItem, search, search, sizeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclear, sizepublic void insert(Box box, T item)
insert in interface SpatialIndex<T>public boolean remove(Box box, T item)
remove in interface SpatialIndex<T>public java.util.List<T> search(Box bbox, java.util.List<T> results)
search in interface SpatialIndex<T>public boolean search(Box bbox, SpatialIndex.SearchCb<T> cb, java.lang.Object context)
search in interface SpatialIndex<T>public java.util.List<T> searchKNearestNeighbors(Point center, int k, double maxDistance, java.util.List<T> results)
searchKNearestNeighbors in interface SpatialIndex<T>public void searchKNearestNeighbors(Point center, int k, double maxDistance, SpatialIndex.SearchCb<T> cb, java.lang.Object context)
searchKNearestNeighbors in interface SpatialIndex<T>