16 #ifndef UTILIB_GEOMETRY_QUADTREE_HPP
17 #define UTILIB_GEOMETRY_QUADTREE_HPP
19 #include <UtilLib/include/geometry/QuadTreeNode.hpp>
20 #include <UtilLib/include/geometry/Rectangle.hpp>
51 bool put(std::shared_ptr<Node> pt);
58 std::vector<std::shared_ptr<Node> >
get(
const Rectangle& rect);
95 std::vector<std::shared_ptr<Node> > tempVec;
96 return top_->get(rect, tempVec);
108 #endif // UTILIB_GEOMETRY_QUADTREE_HPP
The class representing a quadtree The template parameter Node needs to provide the methods getXPos() ...
bool put(std::shared_ptr< Node > pt)
put Adds a point into the tree. This method runs in log(n)
~QuadTree()
~QuadTree Destructor of this tree. At the moment no inheritance is wanted.
std::vector< std::shared_ptr< Node > > get(const Rectangle &rect)
get Get all points in the provided rectange. This method runs in log(n)
void clear()
clear Delete all nodes inside this quadTree
QuadTree(const Rectangle &rect, int maxItems=1)
QuadTree A Quad tree on the area defined by the rectangle.
a class representing a rectangle
class representing a node of a quadtree The template parameter Node needs to provide the methods getX...