CGAL 6.1 - Shape Detection

Loading...
Searching...
No Matches
List of all members
CGAL::Shape_detection::Polygon_mesh::Least_squares_plane_fit_sorting< GeomTraits, PolygonMesh, NeighborQuery, VertexToPointMap > Class Template Reference
Reference Manual » Region Growing » Polygon Mesh

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

## Definition

template<typename GeomTraits, typename PolygonMesh, typename NeighborQuery, typename VertexToPointMap = typename boost::property_map<PolygonMesh, CGAL::vertex_point_t>::const_type>
class CGAL::Shape_detection::Polygon_mesh::Least_squares_plane_fit_sorting< GeomTraits, PolygonMesh, NeighborQuery, VertexToPointMap >

Sorting of polygon mesh faces with respect to the local plane fit quality.

`Items` of faces in a polygon mesh are sorted with respect to the quality of the least squares plane fit applied to the vertices of incident faces of each face.

Template Parameters

  GeomTraits | a model of `Kernel`
  PolygonMesh | a model of `FaceListGraph`
  NeighborQuery | a model of `NeighborQuery`
  VertexToPointMap | a model of `ReadablePropertyMap` whose key type is the vertex type of a polygon mesh and value type is `Kernel::Point_3`

Examples
  Shape_detection/region_growing_planes_on_polygon_mesh.cpp.

## Types
using | Item = typename boost::graph_traits< PolygonMesh >::face_descriptor
| Item type.
using | Seed_range = std::vector< Item >
| Seed range.

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

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

## Access
const Seed_range & | ordered ()
| returns an instance of `Seed_range` to access the ordered `Items` of input faces.

## Constructor & Destructor Documentation

## ◆ Least_squares_plane_fit_sorting()

template<typename GeomTraits , typename PolygonMesh , typename NeighborQuery , typename VertexToPointMap = typename boost::property_map<PolygonMesh, CGAL::vertex_point_t>::const_type>
template<typename NamedParameters = CGAL::parameters::Default_named_parameters>

CGAL::Shape_detection::Polygon_mesh::Least_squares_plane_fit_sorting< GeomTraits, PolygonMesh, NeighborQuery, VertexToPointMap >::Least_squares_plane_fit_sorting | ( | const PolygonMesh & | pmesh,
|  | NeighborQuery & | neighbor_query,
|  | const NamedParameters & | np = `parameters::default_values()`
| ) |  |

initializes all internal data structures.

Template Parameters

  NamedParameters | a sequence of Named Parameters

Parameters

  pmesh | an instance of `PolygonMesh` that represents a polygon mesh
  neighbor_query | an instance of `NeighborQuery` that is used internally to access face's neighbors
  np | a sequence of Named Parameters among the ones listed below

Optional Named Parameters

  an instance of `VertexToPointMap` that maps a polygon mesh vertex to `Kernel::Point_3` Default: `boost::get(CGAL::vertex_point, pmesh)` |
  an instance of `GeomTraits` Default: `GeomTraits()` |

Precondition
  `faces(pmesh).size() > 0`