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

[GeoLib] SimplePolygonTree::insertSimplePolygonTree(): Use existing, correct working code.

parent 6ceb4ad8
No related branches found
No related tags found
No related merge requests found
...@@ -52,15 +52,7 @@ void SimplePolygonTree::insertSimplePolygonTree (SimplePolygonTree* polygon_hier ...@@ -52,15 +52,7 @@ void SimplePolygonTree::insertSimplePolygonTree (SimplePolygonTree* polygon_hier
bool nfound (true); bool nfound (true);
for (std::list<SimplePolygonTree*>::const_iterator it (_childs.begin()); for (std::list<SimplePolygonTree*>::const_iterator it (_childs.begin());
it != _childs.end() && nfound; ++it) { it != _childs.end() && nfound; ++it) {
// check all points of polygon if (((*it)->getPolygon())->isPolylineInPolygon (*(polygon))) {
size_t n_pnts_polygon (polygon->getNumberOfPoints()), cnt(0);
for (size_t k(0); k < n_pnts_polygon && cnt == k; k++) {
if (((*it)->getPolygon())->isPntInPolygon (*(polygon->getPoint(k)))) {
cnt++;
}
}
// all points of the given polygon are contained in the current polygon
if (cnt == n_pnts_polygon) {
(*it)->insertSimplePolygonTree (polygon_hierarchy); (*it)->insertSimplePolygonTree (polygon_hierarchy);
nfound = false; nfound = 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