CGAL 6.2 - Shape Detection

Loading...
Searching...
No Matches
List of all members | Related Functions
CGAL::Shape_detection::Point_set::Least_squares_plane_fit_sorting< GeomTraits, Item_, NeighborQuery, PointMap, NormalMap > Class Template Reference
Reference Manual » Region Growing » Point Set

`#include <CGAL/Shape_detection/Region_growing/Point_set/Least_squares_plane_fit_sorting.h>`

## Definition

template<typename GeomTraits, typename Item_, typename NeighborQuery, typename PointMap, typename NormalMap>
class CGAL::Shape_detection::Point_set::Least_squares_plane_fit_sorting< GeomTraits, Item_, NeighborQuery, PointMap, NormalMap >

Sorting of 3D points with respect to the local plane fit quality.

Indices of 3D input points are sorted with respect to the quality of the least squares plane fit applied to the neighboring points of each point.

Template Parameters

  GeomTraits | a model of `Kernel`
  Item_ | a descriptor representing a given point. Must be a model of `Hashable`.
  NeighborQuery | a model of `NeighborQuery`
  PointMap | a model of `ReadablePropertyMap` whose key type is the value type of the input range and value type is `GeomTraits::Point_3`
  NormalMap | a model of `ReadablePropertyMap` whose key type is the value type of the input range and value type is `GeomTraits::Vector_3`

## Related Functions
(Note that these are not member functions.)
template<class PointSet3 , class NeighborQuery >
using | Least_squares_plane_fit_sorting_for_point_set = Least_squares_plane_fit_sorting< typename Kernel_traits< typename PointSet3::Point_3 >::Kernel, typename PointSet3::Index, NeighborQuery, typename PointSet3::Point_map, typename PointSet3::Vector_map >
| shortcut to ease the definition of the class when using `CGAL::Point_set_3`.
template<class PointSet3 , class NeighborQuery , typename NamedParameters = CGAL::parameters::Default_named_parameters>
Least_squares_plane_fit_sorting_for_point_set< PointSet3, NeighborQuery > | make_least_squares_plane_fit_sorting (const PointSet3 &ps, NeighborQuery &neighbor_query, const NamedParameters np=parameters::default_values())
| returns an instance of the sorting class to be used with `CGAL::Point_set_3`, with point and normal maps added to `np`.

## Types
using | Item = Item_
| Item type.
using | Seed_range = std::vector< Item >
| Seed range.

## Initialization
template<typename InputRange , typename NamedParameters = CGAL::parameters::Default_named_parameters>
| Least_squares_plane_fit_sorting (const InputRange &input_range, NeighborQuery &neighbor_query, const NamedParameters &np=parameters::default_values())
| initializes all internal data structures.

## Sorting
void | sort ()
| sorts `Items` of input points.

## Access
const Seed_range & | ordered ()
| returns an instance of `Seed_range` to access the ordered `Items` of input points.
double | mean_distance ()
| the average of the maximal point to fitted plane distance in each neighborhood.
double | mean_deviation ()
| the average of the maximal normal deviation to fitted plane in each neighborhood.

## Constructor & Destructor Documentation

## ◆ Least_squares_plane_fit_sorting()

template<typename GeomTraits , typename Item_ , typename NeighborQuery , typename PointMap , typename NormalMap >
template<typename InputRange , typename NamedParameters = CGAL::parameters::Default_named_parameters>

CGAL::Shape_detection::Point_set::Least_squares_plane_fit_sorting< GeomTraits, Item_, NeighborQuery, PointMap, NormalMap >::Least_squares_plane_fit_sorting | ( | const InputRange & | input_range,
|  | NeighborQuery & | neighbor_query,
|  | const NamedParameters & | np = `parameters::default_values()`
| ) |  |

initializes all internal data structures.

Template Parameters

  InputRange | a model of `ConstRange` whose iterator type is `RandomAccessIterator`
  NamedParameters | a sequence of Named Parameters

Parameters

  input_range | an instance of `InputRange` with 3D points
  neighbor_query | an instance of `NeighborQuery` that is used internally to access point's neighbors
  np | a sequence of Named Parameters among the ones listed below

Optional Named Parameters

  an instance of a model of `ReadablePropertyMap` with `InputRange::const_iterator` as key type and `Item` as value type. Default: A default is provided when `Item` is `InputRange::const_iterator` or its value type. |
  an instance of `PointMap` that maps an item to `GeomTraits::Point_3` Default: `PointMap()` |
  an instance of `NormalMap` that maps an item to `GeomTraits::Vector_3` Default: `NormalMap()` |
  an instance of `GeomTraits` Default: `GeomTraits()` |

Precondition
  `input_range.size() > 0`