Definition at line 39 of file ped_tree.h.
Ped::Ttree::Ttree 
( 
Ped::Tscene * 
pscene, 


int 
pdepth, 


double 
px, 


double 
py, 


double 
pw, 


double 
ph 

) 
 
Description: set intial values
 Author
 chgloor
 Date
 20120128
Definition at line 19 of file ped_tree.cpp.
Destructor. Deleted this node and all its children. If there are any agents left, they are removed first (not deleted).
 Author
 chgloor
 Date
 20120128
Definition at line 37 of file ped_tree.cpp.
Adds an agent to the tree. Searches the right node and adds the agent there. If there are too many agents at that node allready, a new child is created.
 Author
 chgloor
 Date
 20120128
 Parameters

Definition at line 65 of file ped_tree.cpp.
void Ped::Ttree::addChildren 
( 
 ) 


protectedvirtual 
A little helper that adds child nodes to this node
 Author
 chgloor
 Date
 20120128
Definition at line 97 of file ped_tree.cpp.
Checks if this tree node has not enough agents in it to justify more child nodes. It does this by checking all child nodes, too, recursively. If there are not enough children, it moves all the agents into this node, and deletes the child nodes.
 Author
 chgloor
 Date
 20120128
 Returns
 the number of agents in this and all child nodes.
Definition at line 151 of file ped_tree.cpp.
set< const Ped::Tagent * > Ped::Ttree::getAgents 
( 
 ) 
const 

virtual 
Returns the set of agents that is stored within this tree node
 Author
 chgloor
 Date
 20120128
 Returns
 The set of agents
Definition at line 188 of file ped_tree.cpp.
bool Ped::Ttree::intersects 
( 
double 
px, 


double 
py, 


double 
pr 

) 
 const 

virtual 
Checks if a point x/y is within the space handled by the tree node, or within a given radius r
 Author
 chgloor
 Date
 20120129
 Returns
 true if the point is within the space
 Parameters

px  The x coordinate of the point 
py  The y coordinate of the point 
pr  The radius 
Definition at line 226 of file ped_tree.cpp.
Updates the tree structure if an agent moves. Removes the agent and places it again, if outside boundary. If an this happens, this is O(log n), but O(1) otherwise.
 Author
 chgloor
 Date
 20120128
 Parameters

Definition at line 125 of file ped_tree.cpp.
The documentation for this class was generated from the following files: