gov.nasa.worldwind.util
Class SectorTree<T>
java.lang.Object
gov.nasa.worldwind.util.SectorTree<T>
- Direct Known Subclasses:
- SectorTree.MarkerTree
public abstract class SectorTree<T>
- extends java.lang.Object
|
Constructor Summary |
SectorTree(Sector coverage,
int depth,
int maxDepth,
boolean addToAllLevels)
|
SectorTree(Sector coverage,
int depth,
int maxDepth,
boolean addToAllLevels,
int rows,
int cols)
|
|
Method Summary |
boolean |
add(T item)
|
protected boolean |
contains(Sector extent,
LatLon location)
|
protected abstract SectorTree<T> |
createInstance(Sector extent,
int depth,
int maxDepth,
boolean addToAllLevels)
|
java.util.Collection<T> |
getAll(java.util.Collection<T> itemsOut)
|
Sector |
getCoverage()
|
int |
getDepth()
|
java.util.Collection<T> |
getItems(LatLon location,
int depth,
java.util.Collection<T> itemsOut)
|
java.util.Collection<T> |
getItems(Sector extent,
java.util.Collection<T> itemsOut)
|
int |
getMaxDepth()
|
boolean |
hasItems()
|
protected abstract boolean |
intersects(Sector extent,
T item)
|
protected boolean |
intersectsCoverage(Sector sector1,
Sector sector2)
|
protected boolean |
maxDepthAdd(T item)
|
protected boolean |
normalAdd(T item)
|
void |
remove(T item)
|
protected java.util.ArrayList<Sector> |
subdivide(Sector extent,
int rows,
int cols)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
addToAllLevels
protected boolean addToAllLevels
children
protected java.util.ArrayList<SectorTree<T>> children
coverage
protected Sector coverage
depth
protected int depth
items
protected java.util.List<T> items
maxDepth
protected int maxDepth
subCoverage
protected java.util.List<Sector> subCoverage
SectorTree
public SectorTree(Sector coverage,
int depth,
int maxDepth,
boolean addToAllLevels)
SectorTree
public SectorTree(Sector coverage,
int depth,
int maxDepth,
boolean addToAllLevels,
int rows,
int cols)
add
public boolean add(T item)
contains
protected boolean contains(Sector extent,
LatLon location)
createInstance
protected abstract SectorTree<T> createInstance(Sector extent,
int depth,
int maxDepth,
boolean addToAllLevels)
getAll
public java.util.Collection<T> getAll(java.util.Collection<T> itemsOut)
getCoverage
public Sector getCoverage()
getDepth
public int getDepth()
getItems
public java.util.Collection<T> getItems(LatLon location,
int depth,
java.util.Collection<T> itemsOut)
getItems
public java.util.Collection<T> getItems(Sector extent,
java.util.Collection<T> itemsOut)
getMaxDepth
public int getMaxDepth()
hasItems
public boolean hasItems()
intersects
protected abstract boolean intersects(Sector extent,
T item)
intersectsCoverage
protected boolean intersectsCoverage(Sector sector1,
Sector sector2)
maxDepthAdd
protected boolean maxDepthAdd(T item)
normalAdd
protected boolean normalAdd(T item)
remove
public void remove(T item)
subdivide
protected java.util.ArrayList<Sector> subdivide(Sector extent,
int rows,
int cols)