\( \newcommand{\E}{\mathrm{E}} \) \( \newcommand{\A}{\mathrm{A}} \) \( \newcommand{\R}{\mathrm{R}} \) \( \newcommand{\N}{\mathrm{N}} \) \( \newcommand{\Q}{\mathrm{Q}} \) \( \newcommand{\Z}{\mathrm{Z}} \) \( \def\ccSum #1#2#3{ \sum_{#1}^{#2}{#3} } \def\ccProd #1#2#3{ \sum_{#1}^{#2}{#3} }\)
CGAL 4.11.3 - CGAL and the Boost Graph Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
CGAL and the Boost Graph Library Reference

emst-detail.png
Andreas Fabri, Fernando Cacciola, Philipp Moeller, and Ron Wein
This package provides a framework for interfacing CGAL data structures with the algorithms of the Boost Graph Library, or BGL for short. It allows to run graph algorithms directly on CGAL data structures which are model of the BGL graph concepts, for example the shortest path algorithm on a Delaunay triangulation in order to compute the Euclidean minimum spanning tree. Furthermore, it introduces several new graph concepts describing halfedge data structures.


Introduced in: CGAL 3.3
BibTeX: cgal:cfw-cbgl-18b
License: LGPL

Classified Reference Pages

Concepts

Properties

CGAL Classes Adapted for the Graph API

Different CGAL types have been adapted as graphs for the Bgl. All adapted types are listed here. The pages document which concepts they model, the properties they support, and any possible caveats that a user might encounter.

Helper Classes

Helper Functions

Iterators

Circulators

Euler Operations

Selection

Conversion Functions

Graph Adaptors

I/O Functions

Modules

 Specializations of boost::graph_traits
 The Bgl defines the class template boost::graph_traits as a uniform interface to the properties and types of graph types.
 
 Concepts
 We extend the Boost Graph Library (Bgl for short) with a set of new concepts.
 
 Properties
 The property tags model of the boost concept PropertyTag.
 
 Helper Classes
 Several classes that enable to store ids in vertices/halfedges/faces of a CGAL::Polyhedron_3, as well as adapters such as CGAL::Dual.
 
 Helper Functions
 Generic convenience functions for testing if an edge is a border edge, if a mesh is triangular, for conversion between models of different FaceGraph concepts, etc.
 
 Iterators and Circulators
 Several iterators and circulators are provided that enable, for example, to iterate through the halfedges incident to a given face or vertex.
 
 Selection Functions
 Several functions to enlarge or reduce a k-ring selection of vertices, edges, or faces.
 
 Graph adaptors
 Graph adaptors are classes that build an interface over an existing graph to provide new functionalities.
 
 Euler Operations
 We call high level operations that maintain the validity of a halfedge graph Euler Operations.
 
 I/O Functions
 

Functions

template<typename Graph , typename Visitor , typename IsTerminal >
void CGAL::split_graph_into_polylines (const Graph &graph, Visitor &polyline_visitor, IsTerminal is_terminal)
 splits into polylines the graph g at vertices of degree greater than 2 and at vertices for which is_terminal(v,graph)==true. More...
 
template<class Nef_polyhedron , class Polygon_mesh >
void CGAL::convert_nef_polyhedron_to_polygon_mesh (const Nef_polyhedron &nef, Polygon_mesh &pm)
 Converts an objet of type Nef_polyhedron_3 into a polygon mesh model of MutableFaceGraph. More...
 

Function Documentation

template<class Nef_polyhedron , class Polygon_mesh >
void CGAL::convert_nef_polyhedron_to_polygon_mesh ( const Nef_polyhedron &  nef,
Polygon_mesh &  pm 
)

Converts an objet of type Nef_polyhedron_3 into a polygon mesh model of MutableFaceGraph.

Note that contrary to Nef_polyhedron_3::convert_to_polyhedron(), the output is not triangulated (but faces with more than one connected component of the boundary). The polygon mesh can be triangulated using the function triangulate_faces().

Precondition
Polygon_mesh must have an internal point property map with value type being Nef_polyhedron_3::Point_3.
nef.simple()

#include <CGAL/boost/graph/convert_nef_polyhedron_to_polygon_mesh.h>

template<typename Graph , typename Visitor , typename IsTerminal >
void CGAL::split_graph_into_polylines ( const Graph &  graph,
Visitor &  polyline_visitor,
IsTerminal  is_terminal 
)

splits into polylines the graph g at vertices of degree greater than 2 and at vertices for which is_terminal(v,graph)==true.

The polylines are reported using a visitor.

Template Parameters
Grapha model of the boost concepts VertexListGraph and EdgeListGraph.
Visitora class that provides:
  • void start_new_polyline() called when starting the description of a polyline.
  • void add_node(typename boost::graph_traits<Graph>::vertex_descriptor v) called for each vertex v of the polyline currently described.
  • void end_polyline() called when the description of a polyline is finished.
IsTerminalA functor providing bool operator()(boost::graph_traits<Graph>::vertex_descriptor v, const Graph& g) const returning true if the vertex v of degree 2 is a polyline endpoint and false otherwise.

An overload without is_terminal is provided if no vertices but those of degree different from 2 are polyline endpoints.

#include <CGAL/boost/graph/split_graph_into_polylines.h>

Examples:
Surface_mesh_skeletonization/simple_mcfskel_example.cpp.