Skip to content

Commit

Permalink
Enable repeated refinement of an octree
Browse files Browse the repository at this point in the history
  • Loading branch information
JacksonCampolattaro committed Jul 21, 2020
1 parent cbe61e6 commit ca08d16
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Octree/include/CGAL/Octree.h
Expand Up @@ -201,11 +201,16 @@ class Octree {
*
* The split criterion can be any function pointer that takes a Node pointer
* and returns a boolean value (where true implies that a Node needs to be split).
* It's safe to call this function repeatedly, and with different criterion.
*
* \param split_criterion rule to use when determining whether or not a node needs to be subdivided
*/
void refine(const Split_criterion_function &split_criterion) {

// If the tree has already been refined, reset it
if (!m_root.is_leaf())
m_root.unsplit();

// 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

0 comments on commit ca08d16

Please sign in to comment.