\( \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.12 - dD Triangulations
triangulation_data_structure_dynamic.cpp
#include <CGAL/Triangulation_data_structure.h>
#include <CGAL/assertions.h>
#include <vector>
int main()
{
const int ddim = 5; // dimension of TDS with dynamic dimension
TDS;
typedef TDS::Vertex_handle Vertex_handle;
TDS D(ddim); // the argument is taken into account.
CGAL_assertion( ddim == D.maximal_dimension() );
CGAL_assertion( -2 == D.current_dimension() );
CGAL_assertion( D.is_valid() );
std::vector<Vertex_handle> V(5);
V[0] = D.insert_increase_dimension();
V[1] = D.insert_increase_dimension(V[0]);
V[2] = D.insert_increase_dimension(V[0]);
V[3] = D.insert_increase_dimension(V[0]);
V[4] = D.insert_in_full_cell(V[3]->full_cell());
CGAL_assertion( 6 == D.number_of_full_cells() );
CGAL_assertion( 2 == D.current_dimension() );
CGAL_assertion( D.is_valid() );
return 0;
}