Go to the documentation of this file.
43 #include <boost/shared_array.hpp>
84 double maxDistance = std::numeric_limits<double>::infinity()
88 distance = maxDistance;
89 nnInternal(point.template cast<PointT>(), neighbor, distance);
91 return neighbor !=
nullptr;
virtual ~KDTree()=default
virtual void nnInternal(const Point &point, Neighbor &neighbor, double &maxDist) const =0
static std::shared_ptr< KDTree > create(SLAMScanPtr scan, int maxLeafSize=20)
Creates a new KDTree from the given Scan.
boost::shared_array< Point > points
std::shared_ptr< KDTree > KDTreePtr
static size_t nearestNeighbors(KDTreePtr tree, SLAMScanPtr scan, Neighbor *neighbors, double maxDistance, Vector3d ¢roid_m, Vector3d ¢roid_d)
Finds the nearest neighbors of all points in a Scan using a pre-generated KDTree.
std::shared_ptr< SLAMScanWrapper > SLAMScanPtr
Eigen::Matrix< T, 3, 1 > Vector3
Eigen 3D vector.
bool nearestNeighbor(const Vector3< T > &point, Neighbor &neighbor, double &distance, double maxDistance=std::numeric_limits< double >::infinity()) const
Finds the nearest neighbor of 'point' that is within 'maxDistance' (defaults to infinity)....
Eigen::Vector3d Vector3d
Eigen 3D vector, double precision.
Representation of a point in 3D space.
std::shared_ptr< KDTree > KDTreePtr
a kd-Tree Implementation for nearest Neighbor searches
lvr2
Author(s): Thomas Wiemann
, Sebastian Pütz , Alexander Mock , Lars Kiesow , Lukas Kalbertodt , Tristan Igelbrink , Johan M. von Behren , Dominik Feldschnieders , Alexander Löhr
autogenerated on Wed Mar 2 2022 00:37:23