CGAL 5.1.4 - Classification
CGAL::Classification::Point_set_neighborhood< GeomTraits, PointRange, PointMap > Class Template Reference

#include <CGAL/Classification/Point_set_neighborhood.h>

Definition

Class that precomputes spatial searching structures for an input point set and gives access to the local neighborhood of a point as a set of indices.

It allows the user to generate models of NeighborQuery based on a fixed range neighborhood or on a fixed K number of neighbors. In addition, the spatial searching structures can be computed on a simplified version of the point set to allow for neighbor queries at a higher scale.

Template Parameters
GeomTraitsis a model of CGAL Kernel.
PointRangemodel of ConstRange. Its iterator type is RandomAccessIterator and its value type is the key type of PointMap.
PointMapmodel of ReadablePropertyMap whose key type is the value type of the iterator of PointRange and value type is GeomTraits::Point_3.

Classes

class  K_neighbor_query
 Functor that computes the neighborhood of an input point with a fixed number of neighbors. More...
 
class  Sphere_neighbor_query
 Functor that computes the neighborhood of an input point defined as the points lying in a sphere of fixed radius centered at the input point. More...
 

Constructors

template<typename ConcurrencyTag >
 Point_set_neighborhood (const PointRange &input, PointMap point_map, const ConcurrencyTag &)
 Constructs a neighborhood object based on the input range. More...
 
template<typename ConcurrencyTag >
 Point_set_neighborhood (const PointRange &input, PointMap point_map, float voxel_size, const ConcurrencyTag &)
 Constructs a simplified neighborhood object based on the input range. More...
 

Queries

K_neighbor_query k_neighbor_query (const unsigned int k) const
 Returns a neighbor query object with fixed number of neighbors k.
 
Sphere_neighbor_query sphere_neighbor_query (const float radius) const
 Returns a neighbor query object with fixed radius radius.
 

Constructor & Destructor Documentation

◆ Point_set_neighborhood() [1/2]

template<typename GeomTraits , typename PointRange , typename PointMap >
template<typename ConcurrencyTag >
CGAL::Classification::Point_set_neighborhood< GeomTraits, PointRange, PointMap >::Point_set_neighborhood ( const PointRange &  input,
PointMap  point_map,
const ConcurrencyTag &   
)

Constructs a neighborhood object based on the input range.

Template Parameters
ConcurrencyTagenables sequential versus parallel algorithm. Possible values are Sequential_tag, Parallel_tag, and Parallel_if_available_tag. If no tag is provided, Parallel_if_available_tag is used.
Parameters
inputpoint range.
point_mapproperty map to access the input points.

◆ Point_set_neighborhood() [2/2]

template<typename GeomTraits , typename PointRange , typename PointMap >
template<typename ConcurrencyTag >
CGAL::Classification::Point_set_neighborhood< GeomTraits, PointRange, PointMap >::Point_set_neighborhood ( const PointRange &  input,
PointMap  point_map,
float  voxel_size,
const ConcurrencyTag &   
)

Constructs a simplified neighborhood object based on the input range.

This method first computes a simplified version of the input point set by voxelization: a 3D grid is defined and for each subset present in one cell, only the point closest to the centroid of this subset is used.

Template Parameters
ConcurrencyTagenables sequential versus parallel algorithm. Possible values are Sequential_tag, Parallel_tag, and Parallel_if_available_tag. If no tag is provided, Parallel_if_available_tag is used.
Parameters
inputinput range.
point_mapproperty map to access the input points.
voxel_sizesize of the cells of the 3D grid used for simplification.