CGAL 5.1.3 - Shape Detection
CGAL::Shape_detection::Polygon_mesh::Least_squares_plane_fit_sorting< GeomTraits, PolygonMesh, NeighborQuery, FaceRange, VertexToPointMap > Class Template Reference

#include <CGAL/Shape_detection/Region_growing/Region_growing_on_polygon_mesh/Least_squares_plane_fit_sorting.h>

Definition

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

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

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

Template Parameters
GeomTraitsmust be a model of Kernel.
PolygonMeshmust be a model of FaceListGraph.
NeighborQuerymust be a model of NeighborQuery.
FaceRangemust be a model of ConstRange whose iterator type is RandomAccessIterator and value type is the face type of a polygon mesh.
VertexToPointMapmust be an LvaluePropertyMap whose key type is the vertex type of a polygon mesh and value type is Kernel::Point_3.
Examples:
Shape_detection/region_growing_on_polygon_mesh.cpp.

Initialization

 Least_squares_plane_fit_sorting (const PolygonMesh &pmesh, NeighborQuery &neighbor_query, const VertexToPointMap vertex_to_point_map=VertexToPointMap())
 initializes all internal data structures. More...
 

Sorting

void sort ()
 sorts indices of polygon mesh faces.
 

Access

Seed_map seed_map ()
 returns an instance of Seed_map to access the ordered indices of polygon mesh faces.
 

Constructor & Destructor Documentation

◆ Least_squares_plane_fit_sorting()

template<typename GeomTraits , typename PolygonMesh , typename NeighborQuery , typename FaceRange = typename PolygonMesh::Face_range, typename VertexToPointMap = typename boost::property_map<PolygonMesh, CGAL::vertex_point_t>::type>
CGAL::Shape_detection::Polygon_mesh::Least_squares_plane_fit_sorting< GeomTraits, PolygonMesh, NeighborQuery, FaceRange, VertexToPointMap >::Least_squares_plane_fit_sorting ( const PolygonMesh &  pmesh,
NeighborQuery neighbor_query,
const VertexToPointMap  vertex_to_point_map = VertexToPointMap() 
)

initializes all internal data structures.

Parameters
pmeshan instance of PolygonMesh that represents a polygon mesh
neighbor_queryan instance of NeighborQuery that is used internally to access face's neighbors
vertex_to_point_mapan instance of VertexToPointMap that maps a polygon mesh vertex to Kernel::Point_3
Precondition
faces(pmesh).size() > 0