MEPP2 Project
Halfedge Adaptor of CellIncidenceGraph
dot_inline_dotgraph_2.png

Diagram reference: CGAL and BGL concepts diagram

CellIncidenceGraph Halfedge Adaptor

The purpose of the Halfedge Adaptor of a CellIncidenceGraph is for a CellIncidenceGraph to provide, through an adaptor, a partial implementation of CGAL's halfedge concept. Although the halfedge is well suited to manifold surfaces, and not general enough to handle non-manifold cases (refer to CellIncidenceGraphConceptPage), this adaptor still enables simple walks on the non-manifold which in turn permit to abstract the vizualization code.

Notations

  • G A type that is a model of HalfedgeGraphAdapter.
  • g An object of type G.
  • h A halfedge descriptor.
Expression Reference Returns Description
HalfedgeGraph
next(h, g) HalfedgeGraph (CGAL) halfedge_descriptor The next halfedge around its face.
prev(h, g) HalfedgeGraph (CGAL) halfedge_descriptor The previous halfedge around its face.
faces(h,g) Generalization of FaceGraph's face(h, g,) std::pair<face_iterator, face_iterator> Returns an iterator-range providing access to the incident faces edge e in graph g. Note: when the ordering of faces is a partial order then the ordering criteria is unspecified and can change arbitrarily.
To be discussed
boost::graph_traits<G>::null_halfedge() HalfedgeGraph (CGAL) halfedge_descriptor Returns a special halfedge that is not equal to any other halfedge.

FIXME:

  • How does one access an halfedge out of an CellIncidenceGraph instance ? (constructor out of an edge)
  • Do we need source, target, ...

Design notes:

  • An halfedge h of a HalfedgeGraphAdapter can be implemented as a triplet of references
    • a reference to a cell-vertex v of the wrapped CellIncidenceGraph
    • a reference to an cell-edgea e of the wrapped CellIncidenceGraph
    • a reference to an cell-face f of the wrapped CellIncidenceGraph where f is incident to e and e is incident to v.