Template Class SearchKDTree
Defined in File KDTree.hpp
Inheritance Relationships
Base Types
public lvr2::KDTree< IndexedPoint< BaseVecT > >(Template Class KDTree)public lvr2::SearchTree< BaseVecT >(Template Class SearchTree)
Class Documentation
-
template<typename BaseVecT>
class SearchKDTree : public lvr2::KDTree<IndexedPoint<BaseVecT>>, public lvr2::SearchTree<BaseVecT> Public Functions
-
SearchKDTree(PointBufferPtr buffer)
-
virtual int kSearch(const BaseVecT &qp, int k, std::vector<size_t> &indices, std::vector<CoordT> &distances) const override
This function performs a k-next-neighbor search on the data that was given in the constructor.
- Parameters:
qp – The query point.
k – The number of neighbours that should be searched.
indices – A vector that stores the indices for the neighbours within the dataset.
distances – A vector that stores the distances for the neighbours that are found.
- Returns:
The number of neighbours found
-
virtual int kSearch(const BaseVecT &qp, int k, std::vector<size_t> &indices) const override
Like the other overload, but ignoring the
distancesvector.
-
virtual int radiusSearch(const BaseVecT &qp, int k, float r, std::vector<size_t> &indices, std::vector<CoordT> &distances) const override
Returns all points within the radius
rofqp.- Parameters:
qp – The query point.
r – Radius.
indices – A vector that will be filled with the indices of the points that were found.
-
SearchKDTree(PointBufferPtr buffer)