class OTS2DSet.QuadTreeNode extends Object implements Serializable
Constructor and Description |
---|
QuadTreeNode(Rectangle2D boundingBox)
Construct a new QuadTreeNode.
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(OTSShape shape)
Add an OTSShape to this QuadTreeNode.
|
void |
clear()
Remove all OTSShapes from this QuadTreeNode and cut off all leaves.
|
Set<OTSShape> |
intersectingShapes(Rectangle2D rectangle)
Return a Set containing all OTSShapes in this QuadTreeNode that intersect a rectangular area.
|
boolean |
intersects(OTSShape shape)
Test if the area of this QuadTree intersects an OTSShape.
|
boolean |
remove(OTSShape shape)
Remove an OTSShape from this QuadTreeNode.
|
String |
toString() |
(package private) String |
toString(int recursionDepth)
Recursively print this QuadTreeNode.
|
String |
toStringGraphic(int recursionDepth)
Return a String depicting this QuadTreeNode.
|
QuadTreeNode(Rectangle2D boundingBox)
boundingBox
- Rectangle2D; the bounding box of the area of the new QuadTreeNodepublic Set<OTSShape> intersectingShapes(Rectangle2D rectangle)
rectangle
- Rectangle2D; the areapublic void clear()
public boolean remove(OTSShape shape)
shape
- OTSShape; the shape that must be removed.public boolean intersects(OTSShape shape)
shape
- OTSShape; the shapepublic final boolean add(OTSShape shape)
shape
- OTSShape; the shapefinal String toString(int recursionDepth)
recursionDepth
- int; maximum depth to recursepublic final String toStringGraphic(int recursionDepth)
recursionDepth
- int; levels to recurseCopyright © 2014–2017 Delft University of Technology. All rights reserved.