Skip to content

Commit

Permalink
Add initial side length to map when building octree
Browse files Browse the repository at this point in the history
  • Loading branch information
JacksonCampolattaro committed Aug 6, 2020
1 parent 6cca8b2 commit 25c1aaa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 4 additions & 0 deletions Octree/include/CGAL/Octree.h
Expand Up @@ -191,6 +191,7 @@ class Octree {
m_bbox_min = bbox.min();
m_bbox_side = bbox.max()[0] - m_bbox_min[0];
m_root.points() = {point_range.begin(), point_range.end()};
m_side_per_depth.push_back(m_bbox_side);

}

Expand All @@ -217,6 +218,9 @@ class Octree {
// Make sure the max depth is reset as well
m_max_depth_reached = 0;

// Reset the side length map, too
m_side_per_depth.resize(0);

// create a side length map
for (int i = 0; i <= (int) 32; i++)
m_side_per_depth.push_back(m_bbox_side / (FT) (1 << i));
Expand Down
1 change: 0 additions & 1 deletion Octree/include/CGAL/Octree/IO.h
Expand Up @@ -22,7 +22,6 @@

using std::ostream;


template<typename Value>
ostream &operator<<(ostream &os, const CGAL::Octree::Node<Value> &node) {

Expand Down

0 comments on commit 25c1aaa

Please sign in to comment.