Skip to content

Commit

Permalink
[SpatialPartitioning] Fix kdtree print using old method names
Browse files Browse the repository at this point in the history
  • Loading branch information
Amael Marquez committed Dec 15, 2023
1 parent 53b1fba commit bf61fde
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ Ponca changelog
--------------------------------------------------------------------------------
Current head (v.1.3 RC)

- API
- [SpatialPartitioning] Change part of the kdtree API (#123)

--------------------------------------------------------------------------------
v.1.2
Expand All @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions Ponca/src/SpatialPartitioning/KdTree/kdTree.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ void KdTreeBase<Traits>::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)
Expand All @@ -112,7 +112,7 @@ void KdTreeBase<Traits>::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 " : " ");
Expand Down
2 changes: 1 addition & 1 deletion examples/cpp/ponca_customize_kdtree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit bf61fde

Please sign in to comment.