\( \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.5 - Linear Cell Complex
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Constructions for Linear Cell Complex

Basic constructions.

#include <CGAL/Linear_cell_complex_constructors.h>

Functions

template<class LCC >
LCC::Dart_handle CGAL::import_from_plane_graph (LCC &lcc, std::istream &ais)
 Imports an embedded plane graph read from ais into lcc. More...
 
template<class LCC , class Polyhedron >
LCC::Dart_handle CGAL::import_from_polyhedron_3 (LCC &lcc, const Polyhedron &apoly)
 Imports apoly (a Polyhedron_3) into lcc. More...
 
template<class LCC , class Triangulation_ >
LCC::Dart_handle CGAL::import_from_triangulation_3 (LCC &lcc, const Triangulation_ &atr)
 Imports atr (a Triangulation_3) into lcc. More...
 

Function Documentation

template<class LCC >
LCC::Dart_handle CGAL::import_from_plane_graph ( LCC &  lcc,
std::istream &  ais 
)

Imports an embedded plane graph read from ais into lcc.

Objects are added in lcc, existing darts are not modified. Returns a dart created during the import.

Precondition
LCC::dimension \( \geq\) 2 and LCC::ambient_dimension==2.

File format

The file format must be the following. First the number of vertices and the number of edges of the planar graph. Then, for each vertex of the planar graph, the coordinates of the \( i^{\mbox{th}}\) vertex (two numbers for \( x\) and \( y\) coordinates). The first vertex index is 0. Then for each edge of the planar graph, the two indices of the two vertices (two numbers between 0 and the number of vertices minus 1).

Here a small example:

5 6 
1.0 3.0 0.0 2.0 2.0 2.0 0.0 0.0 2.0 0.0 
0 1 0 2 1 2 1 3 2 4 3 4 
import_graph.png
Example of import_graph reading the above file as istream.
Left: A planar graph embedded in the plane with P0=(1.0,3.0), P1=(0.0,2.0), P2=(2.0,2.0), P3=(0.0,0.0), P4=(2.0,0.0). Right: the 2D linear cell complex reconstructed.
See Also
CGAL::import_from_triangulation_3<LCC,Triangulation>
CGAL::import_from_polyhedron_3<LCC,Polyhedron>

#include <CGAL/Linear_cell_complex_constructors.h>

template<class LCC , class Polyhedron >
LCC::Dart_handle CGAL::import_from_polyhedron_3 ( LCC &  lcc,
const Polyhedron &  apoly 
)

Imports apoly (a Polyhedron_3) into lcc.

Objects are added in lcc, existing darts are not modified. Returns a dart created during the import.

Precondition
LCC::dimension \( \geq\) 2 and LCC::ambient_dimension==3.
See Also
CGAL::import_from_plane_graph<LCC>
CGAL::import_from_triangulation_3<LCC,Triangulation>

#include <CGAL/Linear_cell_complex_constructors.h>

template<class LCC , class Triangulation_ >
LCC::Dart_handle CGAL::import_from_triangulation_3 ( LCC &  lcc,
const Triangulation_ &  atr 
)

Imports atr (a Triangulation_3) into lcc.

Objects are added in lcc, existing darts are not modified. Returns a dart created during the import.

Precondition
LCC::dimension \( \geq\) 3 and LCC::ambient_dimension==3.
See Also
CGAL::import_from_plane_graph<LCC>
CGAL::import_from_polyhedron_3<LCC,Polyhedron>

#include <CGAL/Linear_cell_complex_constructors.h>