LBIBCell
|
The class representing a quadtree The template parameter Node needs to provide the methods getXPos() and getYPos() to access the postion of the node. More...
#include <QuadTree.hpp>
Public Member Functions | |
QuadTree (const Rectangle &rect, int maxItems=1) | |
QuadTree A Quad tree on the area defined by the rectangle. More... | |
~QuadTree () | |
~QuadTree Destructor of this tree. At the moment no inheritance is wanted. | |
bool | put (std::shared_ptr< Node > pt) |
put Adds a point into the tree. This method runs in log(n) More... | |
std::vector< std::shared_ptr < Node > > | get (const Rectangle &rect) |
get Get all points in the provided rectange. This method runs in log(n) More... | |
void | clear () |
clear Delete all nodes inside this quadTree | |
The class representing a quadtree The template parameter Node needs to provide the methods getXPos() and getYPos() to access the postion of the node.
Definition at line 31 of file QuadTree.hpp.
|
explicit |
QuadTree A Quad tree on the area defined by the rectangle.
rect | The boarders of this quad tree |
maxItems | The maximum number of items stored per Node |
Definition at line 75 of file QuadTree.hpp.
std::vector< std::shared_ptr< Node > > UtilLib::geometry::QuadTree< Node >::get | ( | const Rectangle & | rect | ) |
get Get all points in the provided rectange. This method runs in log(n)
rect | The rectange |
Definition at line 93 of file QuadTree.hpp.
bool UtilLib::geometry::QuadTree< Node >::put | ( | std::shared_ptr< Node > | pt | ) |
put Adds a point into the tree. This method runs in log(n)
pt | The Point added |
Definition at line 88 of file QuadTree.hpp.