CGAL 6.2 - Shape Detection

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

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

  PolygonMesh | a model of `FaceListGraph`
  VertexPointMap | a 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` (`boost::graph_traits<PolygonMesh>::edge_descriptor`).
typedef unspecified_type | Segment_map
| a model of `ReadablePropertyMap` whose key type is the value type of `Segment_range` and value type is `Segment_3` from the CGAL Kernel used by `VertexPointMap`.

## 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_range & | segment_range () const
| returns an instance of `Segment_range` to access edges, which form polylines
const Segment_map & | segment_map () const
| returns an instance of `Segment_map` that maps an edge from `segment_range()` to `Segment_3` from the CGAL Kernel used by `VertexPointMap`.

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

  FaceToRegionMap | a model of `ReadablePropertyMap` whose key type is `face_descriptor` of the `PolygonMesh` (`boost::graph_traits<PolygonMesh>::face_descriptor`) and value type is `std::size_t`
  NamedParameters | a sequence of optional Named Parameters

Parameters

  pmesh | a polygon mesh
  face_to_region_map | maps each face of `pmesh` to a corresponding planar region id
  np | a sequence of Named Parameters among the ones listed below

Optional Named Parameters

  an instance of `VertexPointMap` that maps a polygon mesh vertex (`boost::graph_traits<PolygonMesh>::vertex_descriptor`) to `Point_3` from a CGAL Kernel 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

  FaceToRegionMap | a model of `ReadablePropertyMap` whose key type is `face_descriptor` of the `PolygonMesh` (`boost::graph_traits<PolygonMesh>::face_descriptor`) and value type is `std::size_t`
  EdgeRange | a model of `ConstRange` with `edge_descriptor` (`boost::graph_traits<PolygonMesh>::edge_descriptor`) as iterator value type.
  NamedParameters | a sequence of optional Named Parameters

Parameters

  pmesh | a polygon mesh
  edge_range | contains all edges in `pmesh` to be considered in the graph
  face_to_region_map | maps each face of `pmesh` to a corresponding planar region id
  np | a sequence of Named Parameters among the ones listed below

Optional Named Parameters

  an instance of `VertexPointMap` that maps a polygon mesh vertex (`boost::graph_traits<PolygonMesh>::vertex_descriptor`) to `Point_3` from a CGAL Kernel 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

  query | Iterator of EdgeRange of the query edge
  neighbors | Iterators of Segment_range of edges, which are adjacent to the query edge

Precondition
  `query` is a valid element of the input edge_range