Skip to content

Commit

Permalink
[SpatialPartioning] Expose operator() in KdTreeRangeQueryBase
Browse files Browse the repository at this point in the history
  • Loading branch information
nmellado committed Oct 4, 2023
1 parent 1073d26 commit a25da02
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class KdTreeRangeQueryBase : public KdTreeQuery<Traits>, public QueryType
using VectorType = typename DataPoint::VectorType;
using QueryAccelType = KdTreeQuery<Traits>;
using Iterator = IteratorType<IndexType, DataPoint, KdTreeRangeQueryBase>;
using Self = KdTreeRangeQueryBase<Traits, IteratorType, QueryType>;

protected:
friend Iterator;
Expand All @@ -34,6 +35,11 @@ class KdTreeRangeQueryBase : public KdTreeQuery<Traits>, public QueryType
KdTreeQuery<Traits>(kdtree), QueryType(radius, input){}

public:
inline Self& operator()(typename QueryType::InputType input, Scalar radius)
{ QueryAccelType::reset(); return QueryType::template operator()<Self>(input, radius); }
inline Self& operator()(typename QueryType::InputType input)
{ QueryAccelType::reset(); return QueryType::template operator()<Self>(input); }

inline Iterator begin(){
QueryAccelType::reset();
QueryType::reset();
Expand Down

0 comments on commit a25da02

Please sign in to comment.