bool FilterDistance::ApplyFilter(const Sample& sample) const { // check that sample position is inside obstacle radius and not too far from its plan return ((sample.GetPosition() + treePos_) - target_).norm() < treshold_; }