diff --git a/Orthtree/include/CGAL/Orthtree.h b/Orthtree/include/CGAL/Orthtree.h index 7abd20858ff..89b5eabd9f9 100644 --- a/Orthtree/include/CGAL/Orthtree.h +++ b/Orthtree/include/CGAL/Orthtree.h @@ -248,7 +248,7 @@ public: // save orthtree attributes m_bbox_min = construct_point_d_from_array(bbox_min); m_side_per_depth.push_back(bbox_max[0] - bbox_min[0]); - points(root()) = m_traits.root_node_contents(); + data(root()) = m_traits.root_node_contents(); } /// @} @@ -699,11 +699,11 @@ public: return m_node_depths[n]; } - Node_data& points(Node_index n) { + Node_data& data(Node_index n) { return m_node_points[n]; } - const Node_data& points(Node_index n) const { + const Node_data& data(Node_index n) const { return m_node_points[n]; } @@ -841,7 +841,6 @@ public: // Add the node's points to its children m_traits.distribute_node_contents(n, *this, center); - //reassign_points(n, points(n).begin(), points(n).end(), center); } /*! @@ -1038,7 +1037,7 @@ private: // functions : // Loop through each of the points contained by the node // Note: there might be none, and that should be fine! - for (auto p: points(node)) { + for (auto p: data(node)) { // Pair that point with its distance from the search point Node_element_with_distance current_point_with_distance = diff --git a/Orthtree/include/CGAL/Orthtree/IO.h b/Orthtree/include/CGAL/Orthtree/IO.h index 58155fefb06..1bf6bdd7143 100644 --- a/Orthtree/include/CGAL/Orthtree/IO.h +++ b/Orthtree/include/CGAL/Orthtree/IO.h @@ -47,7 +47,7 @@ std::ostream& print_orthtree_node(std::ostream& os, const Node_index& node, cons << ") "; os << "(" - << tree.points(node).size() + << tree.data(node).size() << ") "; // If a node is a leaf, mark it diff --git a/Orthtree/include/CGAL/Orthtree/Split_predicates.h b/Orthtree/include/CGAL/Orthtree/Split_predicates.h index 766a76e3570..b1a38ee1c22 100644 --- a/Orthtree/include/CGAL/Orthtree/Split_predicates.h +++ b/Orthtree/include/CGAL/Orthtree/Split_predicates.h @@ -51,7 +51,7 @@ public: */ template bool operator()(Node_index i, const Tree &tree) const { - return (tree.points(i).size() > m_bucket_size); + return (tree.data(i).size() > m_bucket_size); } }; @@ -132,7 +132,7 @@ public: */ template bool operator()(Node_index i, const Tree &tree) const { - std::size_t num_points = tree.points(i).size(); + std::size_t num_points = tree.data(i).size(); std::size_t depth = tree.depth(i); return (num_points > m_bucket_size && depth < m_max_depth); } diff --git a/Orthtree/include/CGAL/Orthtree_traits_point_2.h b/Orthtree/include/CGAL/Orthtree_traits_point_2.h index 96940dc0276..ff4030a8510 100644 --- a/Orthtree/include/CGAL/Orthtree_traits_point_2.h +++ b/Orthtree/include/CGAL/Orthtree_traits_point_2.h @@ -185,7 +185,7 @@ public: template void distribute_node_contents(Node_index n, Tree& tree, const Point_d& center) { CGAL_precondition(!tree.is_leaf(n)); - reassign_points(n, tree, center, tree.points(n)); + reassign_points(n, tree, center, tree.data(n)); } Point_d get_element(const Node_data_element& index) const { @@ -207,7 +207,7 @@ private: // Root case: reached the last dimension if (dimension == Dimension::value) { - tree.points(tree.child(n, coord.to_ulong())) = points; + tree.data(tree.child(n, coord.to_ulong())) = points; return; } diff --git a/Orthtree/include/CGAL/Orthtree_traits_point_3.h b/Orthtree/include/CGAL/Orthtree_traits_point_3.h index 2764c41795f..0698b93728b 100644 --- a/Orthtree/include/CGAL/Orthtree_traits_point_3.h +++ b/Orthtree/include/CGAL/Orthtree_traits_point_3.h @@ -202,7 +202,7 @@ public: template void distribute_node_contents(Node_index n, Tree& tree, const Point_d& center) { CGAL_precondition(!tree.is_leaf(n)); - reassign_points(n, tree, center, tree.points(n)); + reassign_points(n, tree, center, tree.data(n)); } Point_d get_element(const Node_data_element& index) const { @@ -224,7 +224,7 @@ private: // Root case: reached the last dimension if (dimension == Dimension::value) { - tree.points(tree.child(n, coord.to_ulong())) = points; + tree.data(tree.child(n, coord.to_ulong())) = points; return; } diff --git a/Orthtree/include/CGAL/Orthtree_traits_point_d.h b/Orthtree/include/CGAL/Orthtree_traits_point_d.h index 23ebb8b7517..243ff8fb29e 100644 --- a/Orthtree/include/CGAL/Orthtree_traits_point_d.h +++ b/Orthtree/include/CGAL/Orthtree_traits_point_d.h @@ -176,7 +176,7 @@ public: template void distribute_node_contents(Node_index n, Tree& tree, const Point_d& center) { CGAL_precondition(!tree.is_leaf(n)); - reassign_points(n, tree, center, tree.points(n)); + reassign_points(n, tree, center, tree.data(n)); } Point_d get_element(const Node_data_element& index) const {