Skip to content
Snippets Groups Projects
Commit 801722f4 authored by Tom Fischer's avatar Tom Fischer
Browse files

[GL] Ret. false if pnt was added to child already.

parent ed80e702
No related branches found
No related tags found
No related merge requests found
...@@ -89,10 +89,13 @@ public: ...@@ -89,10 +89,13 @@ public:
if ((*pnt)[1] < _ll[1]) return false; if ((*pnt)[1] < _ll[1]) return false;
if ((*pnt)[1] > _ur[1]) return false; if ((*pnt)[1] > _ur[1]) return false;
if (!_is_leaf) if (!_is_leaf) {
for (std::size_t k(0); k < 4; k++) for (std::size_t k(0); k < 4; k++) {
if (_childs[k]->addPoint (pnt)) if (_childs[k]->addPoint (pnt))
return true; return true;
}
return false;
}
// check if point is already in quadtree // check if point is already in quadtree
bool pnt_in_quadtree (false); bool pnt_in_quadtree (false);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment