Skip to content

Commit

Permalink
Added change detection
Browse files Browse the repository at this point in the history
  • Loading branch information
danielduberg committed Mar 11, 2020
1 parent 0accfde commit 6c2ea51
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions ufomap/src/octree_rgb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,10 @@ OctreeRGB::setNodeColorRecurs(const Code& code, const Color& color,
{
// Update this node
changed = OctreeBase<OccupancyNodeRGB>::updateNode(inner_node, current_depth);
if (changed && change_detection_enabled_)
{
changed_codes_.insert(code.toDepth(current_depth));
}
}
return std::make_pair(child, changed);
}
Expand Down Expand Up @@ -250,6 +254,12 @@ OctreeRGB::setNodeColorRecurs(const Code& code, const Color& color,
OctreeBase<OccupancyNodeRGB>::updateNode(inner_node, current_depth);
}
}

if (change_detection_enabled_)
{
changed_codes_.insert(code.toDepth(current_depth));
}

return std::make_pair(Node<OccupancyNodeRGB>(&node, code), true);
}
}
Expand Down

0 comments on commit 6c2ea51

Please sign in to comment.