Skip to content

Commit

Permalink
Add max_depth_reached accessor
Browse files Browse the repository at this point in the history
  • Loading branch information
JacksonCampolattaro committed Jul 22, 2020
1 parent cd20011 commit d314d56
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions Octree/include/CGAL/Octree.h
Expand Up @@ -277,6 +277,13 @@ class Octree {
*/
const Node &root() const { return m_root; }

/*!
* \brief Finds the deepest level reached by a leaf node in this tree
*
* \return the deepest level, where root is 0
*/
std::size_t max_depth_reached() const { return m_max_depth_reached; }

/*!
* \brief Constructs an input range of nodes using a tree walker function
*
Expand Down Expand Up @@ -388,7 +395,7 @@ class Octree {
*/
template<typename Point_output_iterator>
void nearest_k_neighbors_in_radius(const Point &search_point, FT search_radius_squared, std::size_t k,
Point_output_iterator output) const {
Point_output_iterator output) const {

// Create an empty list of points
std::vector<Point_with_distance> points_list;
Expand Down Expand Up @@ -549,7 +556,7 @@ class Octree {
};

void nearest_k_neighbors_recursive(Sphere &search_bounds, const Node &node,
std::vector<Point_with_distance> &results, FT epsilon = 0) const {
std::vector<Point_with_distance> &results, FT epsilon = 0) const {

// Check whether the node has children
if (node.is_leaf()) {
Expand Down

0 comments on commit d314d56

Please sign in to comment.