computational.geometry.pointlocation
Class QueryTree

java.lang.Object
  extended by computational.geometry.pointlocation.QueryTree

public class QueryTree
extends java.lang.Object

This structure is used to construct nodes of the rooted tree used in Kirkpatrick's method. Every node has it's unique id, triangle and its children.


Method Summary
 void addChild(QueryTree child)
          Adds children to the node
 boolean contains(Point point)
          Checkes if triangle controlled by the node contains point
 QueryTree getChild(int i)
          Returns the i-th children of the node
 java.util.Vector getChildren()
          Returns children of the node
 int getID()
          Returns id of the node
 int getNumChildren()
          Returns number of children of the node
 Triangle getTriangle()
          Returns triangle of the node
 void setID(int _rootID)
          Sets id of the node
 java.lang.String toString()
          Returns string representation of the node
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

addChild

public void addChild(QueryTree child)
Adds children to the node

Parameters:
child -

contains

public boolean contains(Point point)
Checkes if triangle controlled by the node contains point

Parameters:
point -
Returns:

getChild

public QueryTree getChild(int i)
Returns the i-th children of the node

Parameters:
i -
Returns:

getChildren

public java.util.Vector getChildren()
Returns children of the node

Returns:

getID

public int getID()
Returns id of the node

Returns:

getNumChildren

public int getNumChildren()
Returns number of children of the node

Returns:

getTriangle

public Triangle getTriangle()
Returns triangle of the node

Returns:

setID

public void setID(int _rootID)
Sets id of the node

Parameters:
_rootID -

toString

public java.lang.String toString()
Returns string representation of the node

Overrides:
toString in class java.lang.Object