|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cz.cuni.amis.pogamut.defcon.utils.quadtree.QuadTreeNode
public class QuadTreeNode
Node for a QuadTree
.
Constructor Summary | |
---|---|
QuadTreeNode(QuadTree quadTree,
double x1,
double y1,
double x2,
double y2,
QuadTreeNode parent,
List<List<Location>> subList)
Constructor for a tree node. |
Method Summary | |
---|---|
Location |
getCenter()
Retrieves a point [ (x1 + x2) / 2, (y1 + y2) / 2 ]. |
QuadTreeNode |
getFirst()
Returns the upper left child node. |
QuadTreeNode |
getFourth()
Returns the lower right child node. |
QuadTreeNode[] |
getNodes()
Returns an array containing all nodes (if there are any). |
QuadTreeNode |
getParent()
Returns the parent node of this node |
QuadTreeNode |
getSecond()
Returns the upper right child node. |
double |
getSize()
Returns the width of this node. |
QuadTreeNode |
getThird()
Returns the lower left child node. |
double |
getX1()
|
double |
getX2()
|
double |
getY1()
|
double |
getY2()
|
boolean |
isLabeled()
All nodes through which a line passes are labeled. |
void |
setLabel(boolean value)
Use for you own purposes. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public QuadTreeNode(QuadTree quadTree, double x1, double y1, double x2, double y2, QuadTreeNode parent, List<List<Location>> subList)
quadTree
- parent treex1
- upper left x coordy1
- upper left y coordx2
- lower right x coordy2
- lower right y coordparent
- parent nodesubList
- list of lists of vertices that constitute a line crossing
through this nodes rectangleMethod Detail |
---|
public final double getX1()
public final double getX2()
public final double getY1()
public final double getY2()
public Location getCenter()
public final QuadTreeNode getFirst()
public final QuadTreeNode getSecond()
public final QuadTreeNode getThird()
public final QuadTreeNode getFourth()
public final QuadTreeNode[] getNodes()
public final QuadTreeNode getParent()
public String toString()
toString
in class Object
public final boolean isLabeled()
public final void setLabel(boolean value)
value
- set to true or falsepublic double getSize()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |