CGAL 5.1 - CGAL and the Boost Graph Library

Several iterators and circulators are provided that enable, for example, to iterate through the halfedges incident to a given face or vertex.

Starting at a halfedge h, applying several times next(h,g) brings us back to the halfedge where we started. All halfedges traversed on the way are incident to the same face. Using the composition of the next(h,g) and opposite(h,g) functions results in another cycle, namely the cycle of halfedges which are incident to the same vertex. For convenience, two iterator and circulator types enable iterating through all the halfedges incident to a given face, and all the halfedges having a given vertex as target.

All functions are in the header file <CGAL/boost/graph/iterator.h>

Classes

class  CGAL::Halfedge_around_source_iterator< Graph >
 
class  CGAL::Halfedge_around_target_iterator< Graph >
 
class  CGAL::Halfedge_around_face_iterator< Graph >
 
class  CGAL::Halfedge_around_source_circulator< Graph >
 
class  CGAL::Face_around_target_circulator< Graph >
 
class  CGAL::Halfedge_around_target_circulator< Graph >
 
class  CGAL::Halfedge_around_face_circulator< Graph >
 
class  CGAL::Face_around_face_iterator< Graph >
 
class  CGAL::Face_around_face_circulator< Graph >
 
class  CGAL::Face_around_target_iterator< Graph >
 
class  CGAL::Vertex_around_face_iterator< Graph >
 
class  CGAL::Vertex_around_target_circulator< Graph >
 
class  CGAL::Vertex_around_target_iterator< Graph >
 

Functions

template<typename Graph >
Iterator_range< Halfedge_around_source_iterator< Graph > > CGAL::halfedges_around_source (typename boost::graph_traits< Graph >::halfedge_descriptor h, const Graph &g)
 
template<typename Graph >
Iterator_range< Halfedge_around_source_iterator< Graph > > CGAL::halfedges_around_source (typename boost::graph_traits< Graph >::vertex_descriptor v, const Graph &g)
 
template<typename Graph >
Iterator_range< Halfedge_around_target_iterator< Graph > > CGAL::halfedges_around_target (typename boost::graph_traits< Graph >::halfedge_descriptor h, const Graph &g)
 
template<typename Graph >
Iterator_range< Halfedge_around_target_iterator< Graph > > CGAL::halfedges_around_target (typename boost::graph_traits< Graph >::vertex_descriptor v, const Graph &g)
 
template<typename Graph >
Iterator_range< Halfedge_around_face_iterator< Graph > > CGAL::halfedges_around_face (typename boost::graph_traits< Graph >::halfedge_descriptor h, const Graph &g)
 
template<typename Graph >
Iterator_range< Face_around_target_iterator< Graph > > CGAL::faces_around_target (typename boost::graph_traits< Graph >::halfedge_descriptor h, const Graph &g)
 
template<typename Graph >
Iterator_range< Face_around_face_iterator< Graph > > CGAL::faces_around_face (typename boost::graph_traits< Graph >::halfedge_descriptor h, const Graph &g)
 
template<typename Graph >
Iterator_range< Vertex_around_target_iterator< Graph > > CGAL::vertices_around_target (typename boost::graph_traits< Graph >::halfedge_descriptor h, const Graph &g)
 
template<typename Graph >
Iterator_range< Vertex_around_face_iterator< Graph > > CGAL::vertices_around_face (typename boost::graph_traits< Graph >::halfedge_descriptor h, const Graph &g)
 

Function Documentation

◆ faces_around_face()

template<typename Graph >
Iterator_range<Face_around_face_iterator<Graph> > CGAL::faces_around_face ( typename boost::graph_traits< Graph >::halfedge_descriptor  h,
const Graph &  g 
)

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

returns an iterator range over all edge-adjacent faces to the same face face(h,g).

◆ faces_around_target()

template<typename Graph >
Iterator_range<Face_around_target_iterator<Graph> > CGAL::faces_around_target ( typename boost::graph_traits< Graph >::halfedge_descriptor  h,
const Graph &  g 
)

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

returns an iterator range over all faces around vertex target(h,g).

◆ halfedges_around_face()

template<typename Graph >
Iterator_range<Halfedge_around_face_iterator<Graph> > CGAL::halfedges_around_face ( typename boost::graph_traits< Graph >::halfedge_descriptor  h,
const Graph &  g 
)

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

returns an iterator range over all halfedges incident to the same face or border as h.

Examples
BGL_surface_mesh/seam_mesh.cpp.

◆ halfedges_around_source() [1/2]

template<typename Graph >
Iterator_range<Halfedge_around_source_iterator<Graph> > CGAL::halfedges_around_source ( typename boost::graph_traits< Graph >::halfedge_descriptor  h,
const Graph &  g 
)

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

returns an iterator range over all halfedges with vertex source(h,g) as source.

Examples
BGL_surface_mesh/seam_mesh.cpp.

◆ halfedges_around_source() [2/2]

template<typename Graph >
Iterator_range<Halfedge_around_source_iterator<Graph> > CGAL::halfedges_around_source ( typename boost::graph_traits< Graph >::vertex_descriptor  v,
const Graph &  g 
)

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

returns an iterator range over all halfedges with vertex v as source.

◆ halfedges_around_target() [1/2]

template<typename Graph >
Iterator_range<Halfedge_around_target_iterator<Graph> > CGAL::halfedges_around_target ( typename boost::graph_traits< Graph >::halfedge_descriptor  h,
const Graph &  g 
)

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

returns an iterator range over all halfedges with vertex target(h,g) as target.

Examples
BGL_polyhedron_3/incident_vertices.cpp, BGL_polyhedron_3/transform_iterator.cpp, and BGL_surface_mesh/seam_mesh.cpp.

◆ halfedges_around_target() [2/2]

template<typename Graph >
Iterator_range<Halfedge_around_target_iterator<Graph> > CGAL::halfedges_around_target ( typename boost::graph_traits< Graph >::vertex_descriptor  v,
const Graph &  g 
)

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

returns an iterator range over all halfedges with vertex v as target.

◆ vertices_around_face()

template<typename Graph >
Iterator_range<Vertex_around_face_iterator<Graph> > CGAL::vertices_around_face ( typename boost::graph_traits< Graph >::halfedge_descriptor  h,
const Graph &  g 
)

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

returns an iterator range over all vertices adjacent to the face face(h,g).

◆ vertices_around_target()

template<typename Graph >
Iterator_range<Vertex_around_target_iterator<Graph> > CGAL::vertices_around_target ( typename boost::graph_traits< Graph >::halfedge_descriptor  h,
const Graph &  g 
)

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

returns an iterator range over all vertices adjacent to the vertex target(h,g).