-
an instance of
VertexPointMap
that maps a polygon mesh vertex toKernel::Point_3
-
Default:
boost::get(CGAL::vertex_point, pmesh)
CGAL 6.1 - Shape Detection
|
#include <CGAL/Shape_detection/Region_growing/Polygon_mesh/Polyline_graph.h>
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.
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 |
NeighborQuery
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_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 Kernel::Segment_3 . | |
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.
FaceToRegionMap | a model of ReadablePropertyMap whose key type is face_descriptor of the PolygonMesh and value type is std::size_t |
NamedParameters | a sequence of optional Named 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 |
|
faces(pmesh).size() > 0
edges(pmesh).size() > 0
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.
FaceToRegionMap | a model of ReadablePropertyMap whose key type is face_descriptor of the PolygonMesh and value type is std::size_t |
EdgeRange | a model of ConstRange with edge_descriptor as iterator value type. |
NamedParameters | a sequence of optional Named 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 |
|
faces(pmesh).size() > 0
edges(pmesh).size() > 0
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
.
query | Iterator of EdgeRange of the query edge |
neighbors | Iterators of Segment_range of edges, which are adjacent to the query edge |
query
is a valid element of the input edge_range