40#include <pcl/point_representation.h>
41#include <pcl/search/search.h>
51 template<
typename Po
intT>
67 Entry (
index_t idx,
float dist) : index (idx), distance (dist) {}
69 Entry () : index (0), distance (0) {}
74 operator < (
const Entry& other)
const
76 return (distance < other.distance);
80 operator > (
const Entry& other)
const
82 return (distance > other.distance);
87 float getDistSqr (
const PointT& point1,
const PointT& point2)
const;
107 point_representation_ = point_representation;
111 inline PointRepresentationConstPtr
114 return (point_representation_);
140 Indices &k_indices, std::vector<float> &k_sqr_distances,
141 unsigned int max_nn = 0)
const override;
145 denseKSearch (
const PointT &point,
int k,
Indices &k_indices, std::vector<float> &k_distances)
const;
148 sparseKSearch (
const PointT &point,
int k,
Indices &k_indices, std::vector<float> &k_distances)
const;
151 denseRadiusSearch (
const PointT& point,
double radius,
152 Indices &k_indices, std::vector<float> &k_sqr_distances,
153 unsigned int max_nn = 0)
const;
156 sparseRadiusSearch (
const PointT& point,
double radius,
157 Indices &k_indices, std::vector<float> &k_sqr_distances,
158 unsigned int max_nn = 0)
const;
160 PointRepresentationConstPtr point_representation_;
165#ifdef PCL_NO_PRECOMPILE
166#include <pcl/search/impl/brute_force.hpp>
DefaultPointRepresentation extends PointRepresentation to define default behavior for common point ty...
PointCloud represents the base class in PCL for storing collections of 3D points.
shared_ptr< const PointRepresentation< PointT > > ConstPtr
Implementation of a simple brute force search algorithm.
int nearestKSearch(const PointT &point, int k, Indices &k_indices, std::vector< float > &k_distances) const override
Search for the k-nearest neighbors for the given query point.
PointRepresentationConstPtr getPointRepresentation() const
Get the point representation used for converting points into k-D vectors.
void setPointRepresentation(const PointRepresentationConstPtr &point_representation)
Provide a pointer to the point representation used for converting points into k-D vectors.
~BruteForce() override=default
Destructor for KdTree.
int radiusSearch(const PointT &point, double radius, Indices &k_indices, std::vector< float > &k_sqr_distances, unsigned int max_nn=0) const override
Search for all the nearest neighbors of the query point in a given radius.
BruteForce(bool sorted_results=false)
PointCloudConstPtr input_
typename PointCloud::ConstPtr PointCloudConstPtr
shared_ptr< const Indices > IndicesConstPtr
detail::int_type_t< detail::index_type_size, detail::index_type_signed > index_t
Type used for an index in PCL.
IndicesAllocator<> Indices
Type used for indices in PCL.
shared_ptr< Indices > IndicesPtr
A point structure representing Euclidean xyz coordinates, and the RGB color.