29 using DataPoint =
typename Traits::DataPoint;
30 using IndexType =
typename Traits::IndexType;
31 using Scalar =
typename DataPoint::Scalar;
32 using VectorType =
typename DataPoint::VectorType;
34 using Iterator = IteratorType<IndexType, DataPoint, KdTreeRangeQueryBase>;
47 return QueryType::template operator()<
Self>(input, radius);
53 return QueryType::template operator()<
Self>(input);
66 inline Iterator
end(){
71 inline void advance(Iterator& it){
74 const auto& point = QueryType::getInputPosition(points);
76 if (points.empty() || indices.empty())
82 auto descentDistanceThreshold = [
this](){
return QueryType::descentDistanceThreshold();};
83 auto skipFunctor = [
this](IndexType idx){
return QueryType::skipIndexFunctor(idx);};
84 auto processNeighborFunctor = [&it](IndexType idx, IndexType i, Scalar)
91 for(IndexType i=it.m_start; i<it.m_end; ++i)
93 IndexType idx = indices[i];
94 if(skipFunctor(idx))
continue;
96 Scalar d = (point - points[idx].pos()).squaredNorm();
97 if(d < descentDistanceThreshold())
99 if( processNeighborFunctor(idx, i, d) )
return;
104 [&it](IndexType start, IndexType
end)
109 descentDistanceThreshold,
111 processNeighborFunctor))
112 it.m_index =
static_cast<IndexType
>(points.size());
bool searchInternal(const VectorType &point, LeafPreparationFunctor prepareLeafTraversal, DescentDistanceThresholdFunctor descentDistanceThreshold, SkipIndexFunctor skipFunctor, ProcessNeighborFunctor processNeighborFunctor)
Search internally the neighbors of a point using the kdtree.