\( \newcommand{\E}{\mathrm{E}} \) \( \newcommand{\A}{\mathrm{A}} \) \( \newcommand{\R}{\mathrm{R}} \) \( \newcommand{\N}{\mathrm{N}} \) \( \newcommand{\Q}{\mathrm{Q}} \) \( \newcommand{\Z}{\mathrm{Z}} \) \( \def\ccSum #1#2#3{ \sum_{#1}^{#2}{#3} } \def\ccProd #1#2#3{ \sum_{#1}^{#2}{#3} }\)
CGAL 4.12.2 - 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...
 

Public Member Functions

 Point_set_neighborhood (const PointRange &input, PointMap point_map)
 Constructs a neighborhood object based on the input range. More...
 
 Point_set_neighborhood (const PointRange &input, PointMap point_map, float voxel_size)
 Constructs a simplified neighborhood object based on the input range. More...
 
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.
 

Friends

class K_neighbor_query
 
class Sphere_neighbor_query
 

Constructor & Destructor Documentation

◆ Point_set_neighborhood() [1/2]

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

Constructs a neighborhood object based on the input range.

Parameters
inputpoint range.
point_mapproperty map to access the input points.

◆ Point_set_neighborhood() [2/2]

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

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.

Parameters
inputinput range.
point_mapproperty map to access the input points.
voxel_sizesize of the cells of the 3D grid used for simplification.