33#ifdef OGDF_INCLUDE_CGAL
40# include <CGAL/Constrained_Delaunay_triangulation_2.h>
41# include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
42# include <CGAL/Point_2.h>
43# include <CGAL/Polygon_2.h>
44# include <CGAL/Triangulation_face_base_with_info_2.h>
52template<
typename Kernel>
64 using Vb = CGAL::Triangulation_vertex_base_2<K>;
65 using Fbb = CGAL::Triangulation_face_base_with_info_2<FaceInfo2, K>;
66 using Fb = CGAL::Constrained_triangulation_face_base_2<K, Fbb>;
67 using TDS = CGAL::Triangulation_data_structure_2<Vb, Fb>;
68 using Itag = CGAL::Exact_predicates_tag;
69 using CDT = CGAL::Constrained_Delaunay_triangulation_2<K, TDS, Itag>;
70 using Point = CGAL::Point_2<K>;
74 std::list<typename CDT::Edge>& border) {
75 if (start->info().nesting_level != -1) {
78 std::list<typename CDT::Face_handle>
queue;
79 queue.push_back(start);
80 while (!
queue.empty()) {
81 typename CDT::Face_handle
fh =
queue.front();
83 if (
fh->info().nesting_level == -1) {
84 fh->info().nesting_level = index;
85 for (
int i = 0; i < 3; i++) {
86 typename CDT::Edge e(
fh, i);
87 typename CDT::Face_handle n =
fh->neighbor(i);
88 if (n->info().nesting_level == -1) {
89 if (
ct.is_constrained(e)) {
107 for (
typename CDT::All_faces_iterator it =
cdt.all_faces_begin(); it !=
cdt.all_faces_end();
109 it->info().nesting_level = -1;
111 std::list<typename CDT::Edge> border;
113 while (!border.empty()) {
114 typename CDT::Edge e = border.front();
116 typename CDT::Face_handle n = e.first->neighbor(e.second);
117 if (n->info().nesting_level == -1) {
124 if (polygon.is_empty()) {
127 typename CDT::Vertex_handle
v_prev =
cdt.insert(*CGAL::cpp11::prev(polygon.vertices_end()));
128 for (
typename Polygon_2::Vertex_iterator
vit = polygon.vertices_begin();
129 vit != polygon.vertices_end(); ++
vit) {
130 typename CDT::Vertex_handle
vh =
cdt.insert(*
vit);
141 return std::move(
cdt);
static MultilevelBuilder * getDoubleFactoredZeroAdjustedMerger()
The namespace for all OGDF objects.