CGAL 6.0.2 - Classification

Loading...
Searching...
No Matches
List of all members | Classes
CGAL::Classification::Point_set_neighborhood< GeomTraits, PointRange, PointMap > Class Template Reference
Classification Reference » Point Set Classification

`#include <CGAL/Classification/Point_set_neighborhood.h>`

## Definition

template<typename GeomTraits, typename PointRange, typename PointMap>
class CGAL::Classification::Point_set_neighborhood< GeomTraits, PointRange, PointMap >

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

  GeomTraits | is a model of CGAL Kernel.
  PointRange | model of `ConstRange`. Its iterator type is `RandomAccessIterator` and its value type is the key type of `PointMap`.
  PointMap | model 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.
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.

## 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

  ConcurrencyTag | enables 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

  input | point range.
  point_map | property 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

  ConcurrencyTag | enables 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

  input | input range.
  point_map | property map to access the input points.
  voxel_size | size of the cells of the 3D grid used for simplification.