Skip to content

Commit

Permalink
Remove underscores from new refinement functions.
Browse files Browse the repository at this point in the history
  • Loading branch information
JacksonCampolattaro committed Jun 18, 2020
1 parent 05ab54c commit 5000230
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
14 changes: 7 additions & 7 deletions Octree/include/CGAL/Octree.h
Expand Up @@ -137,7 +137,7 @@ namespace CGAL {
m_root.unsplit();
}

void _refine(size_t max_depth, size_t max_pts_num) {
void refine(size_t max_depth, size_t max_pts_num) {

// Make sure arguments are valid
if (max_depth < 0 || max_pts_num < 1) {
Expand All @@ -148,7 +148,7 @@ namespace CGAL {
for (int i = 0; i <= (int) max_depth; i++)
m_side_per_depth.push_back(m_bbox_side / (FT) (1 << i));

_refine_recurse(m_root, max_depth, max_pts_num);
refine_recurse(m_root, max_depth, max_pts_num);

for (int i = 0; i <= (int) m_max_depth_reached; i++)
m_unit_per_depth.push_back(1 << (m_max_depth_reached - i));
Expand Down Expand Up @@ -191,10 +191,10 @@ namespace CGAL {
return {bary[0], bary[1], bary[2]};
}

void _refine_recurse(Node &node, size_t dist_to_max_depth, size_t max_pts_num) {
void refine_recurse(Node &node, size_t dist_to_max_depth, size_t max_pts_num) {

// Check if the depth limit is reached, or if the node isn't filled
if (dist_to_max_depth == 0 || node._num_points() <= max_pts_num) {
if (dist_to_max_depth == 0 || node.num_points() <= max_pts_num) {

// If this node is the deepest in the tree, record its depth
if (m_max_depth_reached < node.depth()) m_max_depth_reached = node.depth();
Expand All @@ -207,11 +207,11 @@ namespace CGAL {
node.split();

// Distribute this nodes points among its children
_reassign_points(node);
reassign_points(node);

// Repeat this process for all children (recursive)
for (int child_id = 0; child_id < 8; child_id++) {
_refine_recurse(node[child_id], dist_to_max_depth - 1, max_pts_num);
refine_recurse(node[child_id], dist_to_max_depth - 1, max_pts_num);
}
}

Expand Down Expand Up @@ -267,7 +267,7 @@ namespace CGAL {
return partitions;
}

void _reassign_points(Node &node) {
void reassign_points(Node &node) {

Point center = compute_barycenter_position(node);

Expand Down
4 changes: 2 additions & 2 deletions Octree/include/CGAL/Octree/IO.h
Expand Up @@ -20,8 +20,8 @@ void writeToStream(ostream &os, const CGAL::Octree_node<Kernel, PointRange> &nod
// Print out this node
os << "(" << node.location()[0] << "," << node.location()[1] << "," << node.location()[2] << ")";

if (node._num_points() > 0)
os << " [" << node._num_points() << " points]";
if (node.num_points() > 0)
os << " [" << node.num_points() << " points]";

os << std::endl;

Expand Down
2 changes: 1 addition & 1 deletion Octree/include/CGAL/Octree/Octree_node.h
Expand Up @@ -139,7 +139,7 @@ namespace CGAL {

void add_point(InputIterator point) { m_points.push_back(point); }

size_t _num_points() const {
size_t num_points() const {
return std::distance(_m_points_begin, _m_points_end);
}

Expand Down
2 changes: 1 addition & 1 deletion Octree/test/Octree/octree_test.cpp
Expand Up @@ -39,7 +39,7 @@ int main(void) {
auto point_map = points.point_map();

Octree octree(points, point_map);
octree._refine(10, 1);
octree.refine(10, 1);

std::cout << octree.root();

Expand Down

0 comments on commit 5000230

Please sign in to comment.