diff --git a/CHANGELOG b/CHANGELOG index 07693981..5994db92 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -5,6 +5,8 @@ Ponca changelog -------------------------------------------------------------------------------- Current head (v.1.3 RC) +- API + - [SpatialPartitioning] Change part of the kdtree API (#123) -------------------------------------------------------------------------------- v.1.2 @@ -16,7 +18,6 @@ This release introduces several bug fixes and minor improvements. - [spatialPartitioning] Simplify node customization (#128) - [fitting] Mark `Base` type as protected instead of private in CRTP classes (#119) - [fitting] Improve KdTreeNodes API by hiding internal memory layout, improve methods naming (#120) - - [SpatialPartitioning] Change part of the kdtree API (#123) - Examples - Fix example cuda/ponca_ssgls (#109) diff --git a/Ponca/src/SpatialPartitioning/KdTree/kdTree.hpp b/Ponca/src/SpatialPartitioning/KdTree/kdTree.hpp index d39f5417..bf670676 100644 --- a/Ponca/src/SpatialPartitioning/KdTree/kdTree.hpp +++ b/Ponca/src/SpatialPartitioning/KdTree/kdTree.hpp @@ -102,7 +102,7 @@ void KdTreeBase::print(std::ostream& os, bool verbose) const os << "\n MaxPoints: " << MAX_POINT_COUNT; os << "\n MaxDepth: " << Traits::MAX_DEPTH; os << "\n PointCount: " << point_count(); - os << "\n SampleCount: " << index_count(); + os << "\n SampleCount: " << sample_count(); os << "\n NodeCount: " << node_count(); if (!verbose) @@ -112,7 +112,7 @@ void KdTreeBase::print(std::ostream& os, bool verbose) const os << "\n Samples: ["; static constexpr IndexType SAMPLES_PER_LINE = 10; - for (IndexType i = 0; i < index_count(); ++i) + for (IndexType i = 0; i < sample_count(); ++i) { os << (i == 0 ? "" : ","); os << (i % SAMPLES_PER_LINE == 0 ? "\n " : " "); diff --git a/examples/cpp/ponca_customize_kdtree.cpp b/examples/cpp/ponca_customize_kdtree.cpp index 5619391d..e8f430d8 100644 --- a/examples/cpp/ponca_customize_kdtree.cpp +++ b/examples/cpp/ponca_customize_kdtree.cpp @@ -80,7 +80,7 @@ int main() << *kdtree.nearest_neighbor(query_pt).begin() << std::endl; //! [ReadCustomProperties] - auto bbox = kdtree.node_data()[0].getAabb(); + auto bbox = kdtree.nodes()[0].getAabb(); if (bbox) { std::cout << "Root bounding box is as follows: \n" << " Center: " << bbox->center()