CGAL 5.6 - Shape Detection
Loading...
Searching...
No Matches
CGAL::Shape_detection::Polygon_mesh::Polyline_graph< PolygonMesh, VertexPointMap > Class Template Reference

#include <CGAL/Shape_detection/Region_growing/Polygon_mesh/Polyline_graph.h>

Definition

template<typename PolygonMesh, typename VertexPointMap = typename boost::property_map<PolygonMesh, CGAL::vertex_point_t>::const_type>
class CGAL::Shape_detection::Polygon_mesh::Polyline_graph< PolygonMesh, VertexPointMap >

Polygon mesh edges connected into a graph.

This class returns all edges, which form polylines splitting the polygon mesh being a PolygonMesh into planar regions.

Template Parameters
PolygonMesha model of FaceListGraph
VertexPointMapa model of ReadablePropertyMap whose key type is the vertex type of a polygon mesh and value type is Point_3 from a CGAL Kernel
Is Model Of:
NeighborQuery
Examples
Shape_detection/region_growing_lines_on_segment_set.cpp.

Types

using Item = typename boost::graph_traits< PolygonMesh >::edge_descriptor
 Item type.
 
typedef unspecified_type Segment_range
 a model of ConstRange whose iterator type is RandomAccessIterator and value type is edge_descriptor of the PolygonMesh.
 
typedef unspecified_type Segment_map
 a model of ReadablePropertyMap whose key type is the value type of Segment_range and value type is Kernel::Segment_3.
 

Initialization

template<typename FaceToRegionMap , typename NamedParameters = CGAL::parameters::Default_named_parameters>
 Polyline_graph (const PolygonMesh &pmesh, FaceToRegionMap face_to_region_map, const NamedParameters &np=parameters::default_values())
 initializes all internal data structures.
 
template<typename FaceToRegionMap , typename EdgeRange , typename NamedParameters = parameters::Default_named_parameters>
 Polyline_graph (const PolygonMesh &pmesh, const EdgeRange &edge_range, FaceToRegionMap face_to_region_map, const NamedParameters &np=parameters::default_values())
 initializes all internal data structures.
 

Access

template<typename I >
void operator() (const I query, std::vector< edge_descriptor > &neighbors) const
 implements NeighborQuery::operator()().
 
const Segment_rangesegment_range () const
 returns an instance of Segment_range to access edges, which form polylines
 
const Segment_mapsegment_map () const
 returns an instance of Segment_map that maps an edge from segment_range() to Kernel::Segment_3.
 

Constructor & Destructor Documentation

◆ Polyline_graph() [1/2]

template<typename PolygonMesh , typename VertexPointMap = typename boost::property_map<PolygonMesh, CGAL::vertex_point_t>::const_type>
template<typename FaceToRegionMap , typename NamedParameters = CGAL::parameters::Default_named_parameters>
CGAL::Shape_detection::Polygon_mesh::Polyline_graph< PolygonMesh, VertexPointMap >::Polyline_graph ( const PolygonMesh &  pmesh,
FaceToRegionMap  face_to_region_map,
const NamedParameters &  np = parameters::default_values() 
)

initializes all internal data structures.

Template Parameters
FaceToRegionMapa model of ReadablePropertyMap whose key type is face_descriptor of the PolygonMesh and value type is std::size_t
NamedParametersa sequence of optional Named Parameters
Parameters
pmesha polygon mesh
face_to_region_mapmaps each face of pmesh to a corresponding planar region id
npa sequence of Named Parameters among the ones listed below
Optional Named Parameters
  • an instance of VertexPointMap that maps a polygon mesh vertex to Kernel::Point_3
  • Default: boost::get(CGAL::vertex_point, pmesh)
Precondition
faces(pmesh).size() > 0
edges(pmesh).size() > 0

◆ Polyline_graph() [2/2]

template<typename PolygonMesh , typename VertexPointMap = typename boost::property_map<PolygonMesh, CGAL::vertex_point_t>::const_type>
template<typename FaceToRegionMap , typename EdgeRange , typename NamedParameters = parameters::Default_named_parameters>
CGAL::Shape_detection::Polygon_mesh::Polyline_graph< PolygonMesh, VertexPointMap >::Polyline_graph ( const PolygonMesh &  pmesh,
const EdgeRange &  edge_range,
FaceToRegionMap  face_to_region_map,
const NamedParameters &  np = parameters::default_values() 
)

initializes all internal data structures.

Template Parameters
FaceToRegionMapa model of ReadablePropertyMap whose key type is face_descriptor of the PolygonMesh and value type is std::size_t
EdgeRangea model of ConstRange with edge_descriptor as iterator value type.
NamedParametersa sequence of optional Named Parameters
Parameters
pmesha polygon mesh
edge_rangecontains all edges in pmesh to be considered in the graph
face_to_region_mapmaps each face of pmesh to a corresponding planar region id
npa sequence of Named Parameters among the ones listed below
Optional Named Parameters
  • an instance of VertexPointMap that maps a polygon mesh vertex to Kernel::Point_3
  • Default: boost::get(CGAL::vertex_point, pmesh)
Precondition
faces(pmesh).size() > 0
edges(pmesh).size() > 0

Member Function Documentation

◆ operator()()

template<typename PolygonMesh , typename VertexPointMap = typename boost::property_map<PolygonMesh, CGAL::vertex_point_t>::const_type>
template<typename I >
void CGAL::Shape_detection::Polygon_mesh::Polyline_graph< PolygonMesh, VertexPointMap >::operator() ( const I  query,
std::vector< edge_descriptor > &  neighbors 
) const

implements NeighborQuery::operator()().

This operator retrieves all edges from segment_range(), which are neighbors of the edge query. The Items are returned in neighbors.

Parameters
queryIterator of EdgeRange of the query edge
neighborsIterators of Segment_range of edges, which are adjacent to the query edge
Precondition
query is a valid element of the input edge_range