Skip to content

Commit

Permalink
[OCTREE] Fix the 'OctreeDepthFirstIterator<OctreeT>::operator++' be g…
Browse files Browse the repository at this point in the history
…et the intuitive order.
  • Loading branch information
frozar committed Oct 7, 2018
1 parent 1dd7586 commit c38f4af
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions octree/include/pcl/octree/impl/octree_iterator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,18 +133,16 @@ namespace pcl
if ( (this->max_octree_depth_>=stack_entry.depth_) &&
(stack_entry.node_->getNodeType () == BRANCH_NODE) )
{
unsigned char child_idx;

// current node is a branch node
BranchNode* current_branch =
static_cast<BranchNode*> (stack_entry.node_);

// add all children to stack
for (child_idx = 0; child_idx < 8; ++child_idx)
for (int8_t i = 7; i >= 0; --i)
{
const unsigned char child_idx = (unsigned char) i;

// if child exist

if (this->octree_->branchHasChild(*current_branch, child_idx))
{
// add child to stack
Expand Down

0 comments on commit c38f4af

Please sign in to comment.