diff --git a/doc/tutorials/content/sources/kdtree_search/kdtree_search.cpp b/doc/tutorials/content/sources/kdtree_search/kdtree_search.cpp index d2b99cfa2ef..c53e3f5f268 100644 --- a/doc/tutorials/content/sources/kdtree_search/kdtree_search.cpp +++ b/doc/tutorials/content/sources/kdtree_search/kdtree_search.cpp @@ -38,21 +38,21 @@ main () int K = 10; - std::vector pointIdxNKNSearch(K); - std::vector pointNKNSquaredDistance(K); + std::vector pointIdxKNNSearch(K); + std::vector pointKNNSquaredDistance(K); std::cout << "K nearest neighbor search at (" << searchPoint.x << " " << searchPoint.y << " " << searchPoint.z << ") with K=" << K << std::endl; - if ( kdtree.nearestKSearch (searchPoint, K, pointIdxNKNSearch, pointNKNSquaredDistance) > 0 ) + if ( kdtree.nearestKSearch (searchPoint, K, pointIdxKNNSearch, pointKNNSquaredDistance) > 0 ) { - for (std::size_t i = 0; i < pointIdxNKNSearch.size (); ++i) - std::cout << " " << (*cloud)[ pointIdxNKNSearch[i] ].x - << " " << (*cloud)[ pointIdxNKNSearch[i] ].y - << " " << (*cloud)[ pointIdxNKNSearch[i] ].z - << " (squared distance: " << pointNKNSquaredDistance[i] << ")" << std::endl; + for (std::size_t i = 0; i < pointIdxKNNSearch.size (); ++i) + std::cout << " " << (*cloud)[ pointIdxKNNSearch[i] ].x + << " " << (*cloud)[ pointIdxKNNSearch[i] ].y + << " " << (*cloud)[ pointIdxKNNSearch[i] ].z + << " (squared distance: " << pointKNNSquaredDistance[i] << ")" << std::endl; } // Neighbors within radius search