Skip to content

Commit

Permalink
Fully implement preorder traversal method
Browse files Browse the repository at this point in the history
  • Loading branch information
JacksonCampolattaro committed Jun 25, 2020
1 parent f88dd80 commit 6295277
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions Octree/include/CGAL/Octree/Tree_walker_criterion.h
Expand Up @@ -46,13 +46,17 @@ namespace CGAL {

if (nullptr == next) {

Node *parent = n->parent();
Node *up = n->parent();

if (nullptr == parent)
return nullptr;
while (nullptr != up) {

return next_sibling(parent);
if (nullptr != next_sibling(up))
return next_sibling(up);

up = up->parent();
}

return nullptr;
}

return next;
Expand Down

0 comments on commit 6295277

Please sign in to comment.