|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.umd.cs.jazz.ZSpatialIndex
ZSpatialIndex is a jazz utility class, supporting ZSpatialIndexGroup.
See ZSpatialIndexGroup
for details.
Warning: Serialized and ZSerialized objects of this class will not be compatible with future Jazz releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Jazz. A future release of Jazz will provide support for long term persistence.
ZSpatialIndexGroup
, Serialized FormInner Class Summary | |
class |
ZSpatialIndex.DrawOrderComp
|
Field Summary | |
protected ZCamera |
camera
Surface this r-tree indexes. |
protected java.util.Hashtable |
drawOrder
List of r-tree nodes in draw-order order. |
protected edu.umd.cs.jazz.ZSpatialIndex.RTreeNode |
root
Root of the r-tree. |
Constructor Summary | |
ZSpatialIndex()
Constructs a new ZSpatialIndex. |
|
ZSpatialIndex(ZCamera aCamera)
Constructs a new ZSpatialIndex with the given camera. |
Method Summary | |
protected void |
add(ZNode obj)
internal method: Add a node to the rtree index. |
void |
addNode(ZNode node)
Add a node to the rtree index. |
void |
displayTree(java.lang.String tree)
For debugging, print a depiction of the RTree index tree. |
java.awt.geom.AffineTransform |
getGroupNodeTransform()
Return the localToGlobal transform for the ZSpatialIndexGroup node associated with this index. |
int |
getMaxChildren()
Get the maximum number of children per node. |
int |
getMinChildren()
Get the minimum number of children per node. |
int |
getNodesSearched()
Get number of nodes searched for most recent query. |
boolean |
getStatus()
Return true if indexing is on, otherwise false. |
void |
queryPoint(java.util.ArrayList result,
java.awt.geom.Point2D pt)
Return all objects that overlap a point. |
void |
queryPoint(java.util.ArrayList result,
java.awt.geom.Point2D pt,
double minSize,
double currentMag)
Return objects larger than a minimum size that overlap a point. |
void |
queryWindow(java.util.ArrayList result,
java.awt.geom.Rectangle2D queryBBox)
Return all objects that overlap a bounding rectangle. |
void |
queryWindow(java.util.ArrayList result,
java.awt.geom.Rectangle2D queryBBox,
double minSize,
double currentMag)
Return all objects larger than a minimum size that overlap a bounding rectangle. |
void |
reIndex()
Completely re-index all objects |
protected boolean |
remove(ZNode obj)
internal method: Remove an object from the index. |
boolean |
removeNode(ZNode node)
Remove an object from the index. |
void |
setGroupNodeTransform(java.awt.geom.AffineTransform at)
Set the localToGlobal transform for the ZSpatialIndexGroup node associated with this index. |
void |
setMaxChildren(int aMaxChildren)
Set the maximum number of children per node. |
void |
setMinChildren(int aMinChildren)
Set the minimum number of children per node. |
void |
setStatus(boolean aStatus)
Turn RTree indexing on and off. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected ZCamera camera
protected edu.umd.cs.jazz.ZSpatialIndex.RTreeNode root
protected java.util.Hashtable drawOrder
Constructor Detail |
public ZSpatialIndex()
public ZSpatialIndex(ZCamera aCamera)
aCamera
- A camera.Method Detail |
public int getNodesSearched()
public void setStatus(boolean aStatus)
aStatus
- true to turn indexing on, false otherwise.public boolean getStatus()
public void setGroupNodeTransform(java.awt.geom.AffineTransform at)
public java.awt.geom.AffineTransform getGroupNodeTransform()
public void reIndex()
public void addNode(ZNode node)
obj
- the object.protected void add(ZNode obj)
obj
- the object.public boolean removeNode(ZNode node)
obj
- the object to be removed.protected boolean remove(ZNode obj)
obj
- the object to be removed.public void queryPoint(java.util.ArrayList result, java.awt.geom.Point2D pt)
result
- the objects found.pt
- the point.public void queryPoint(java.util.ArrayList result, java.awt.geom.Point2D pt, double minSize, double currentMag)
result
- the objects found.pt
- the point.minSize
- miminum size of the objects to be found.currentMag
- the current magnification.public void queryWindow(java.util.ArrayList result, java.awt.geom.Rectangle2D queryBBox)
result
- the objects found.queryBBox
- the bounding box.public void queryWindow(java.util.ArrayList result, java.awt.geom.Rectangle2D queryBBox, double minSize, double currentMag)
result
- the objects found.queryBBox
- the bounding box.minSize
- miminum size of the objects to be found.currentMag
- the current magnification.public void displayTree(java.lang.String tree)
tree
- a name for this tree.public int getMinChildren()
public int getMaxChildren()
public void setMinChildren(int aMinChildren)
aMinChildren
- the minimum number of children.public void setMaxChildren(int aMaxChildren)
aMaxChildren
- the maximum number of children.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |