diff --git a/Arrangement_on_surface_2/demo/earth/Aos.cpp b/Arrangement_on_surface_2/demo/earth/Aos.cpp index 2fe52038df8..a20697b146b 100644 --- a/Arrangement_on_surface_2/demo/earth/Aos.cpp +++ b/Arrangement_on_surface_2/demo/earth/Aos.cpp @@ -22,13 +22,14 @@ using json = nlohmann::ordered_json; // Includes for Arrangements on Sphere (AOS) -#include -#include -#include -#include -#include -#include -#include +#include "Aos_defs.h" +//#include +//#include +//#include +//#include +//#include +//#include +//#include #include "arr_print.h" #include "Tools.h" @@ -48,23 +49,23 @@ using json = nlohmann::ordered_json; namespace { - //#define USE_EPIC - -#ifdef USE_EPIC - using Kernel = CGAL::Exact_predicates_inexact_constructions_kernel; -#else - using Kernel = CGAL::Exact_predicates_exact_constructions_kernel; -#endif - - using Geom_traits = CGAL::Arr_geodesic_arc_on_sphere_traits_2; - using Point = Geom_traits::Point_2; - using Curve = Geom_traits::Curve_2; - using Topol_traits = CGAL::Arr_spherical_topology_traits_2; - using Arrangement = CGAL::Arrangement_on_surface_2; - - // the following is from "arr_inexact_construction_segments.h": - using Segment = Geom_traits::X_monotone_curve_2; - using Vertex_handle = Arrangement::Vertex_handle; +// //#define USE_EPIC +// +//#ifdef USE_EPIC +// using Kernel = CGAL::Exact_predicates_inexact_constructions_kernel; +//#else +// using Kernel = CGAL::Exact_predicates_exact_constructions_kernel; +//#endif +// +// using Geom_traits = CGAL::Arr_geodesic_arc_on_sphere_traits_2; +// using Point = Geom_traits::Point_2; +// using Curve = Geom_traits::Curve_2; +// using Topol_traits = CGAL::Arr_spherical_topology_traits_2; +// using Arrangement = CGAL::Arrangement_on_surface_2; +// +// // the following is from "arr_inexact_construction_segments.h": +// using Segment = Geom_traits::X_monotone_curve_2; +// using Vertex_handle = Arrangement::Vertex_handle; // use this traits everytime you construct an arrangment! static Geom_traits s_traits; @@ -84,11 +85,11 @@ namespace { using Ext_aos = CGAL::Arrangement_on_surface_2; // COUNTRIES AOS for grouping the faces by the country name - using Countries_dcel = CGAL::Arr_face_extended_dcel; - using Countries_topol_traits = - CGAL::Arr_spherical_topology_traits_2; - using Countries_arr = - CGAL::Arrangement_on_surface_2; + //using Countries_dcel = CGAL::Arr_face_extended_dcel; + //using Countries_topol_traits = + // CGAL::Arr_spherical_topology_traits_2; + //using Countries_arr = + // CGAL::Arrangement_on_surface_2; diff --git a/Arrangement_on_surface_2/demo/earth/Aos_defs.h b/Arrangement_on_surface_2/demo/earth/Aos_defs.h new file mode 100644 index 00000000000..60019b77bea --- /dev/null +++ b/Arrangement_on_surface_2/demo/earth/Aos_defs.h @@ -0,0 +1,48 @@ +// Copyright(c) 2012, 2020 Tel - Aviv University(Israel). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// +// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// +// Author(s): Engin Deniz Diktas + +#ifndef AOS_DEFS_H +#define AOS_DEFS_H + +#include +#include +#include +#include +#include +#include +#include + + +//#define USE_EPIC + +#ifdef USE_EPIC +using Kernel = CGAL::Exact_predicates_inexact_constructions_kernel; +#else +using Kernel = CGAL::Exact_predicates_exact_constructions_kernel; +#endif + +using Geom_traits = CGAL::Arr_geodesic_arc_on_sphere_traits_2; +using Point = Geom_traits::Point_2; +using Curve = Geom_traits::Curve_2; +using Topol_traits = CGAL::Arr_spherical_topology_traits_2; +using Arrangement = CGAL::Arrangement_on_surface_2; + +// the following is from "arr_inexact_construction_segments.h": +using Segment = Geom_traits::X_monotone_curve_2; +using Vertex_handle = Arrangement::Vertex_handle; + +// COUNTRIES AOS for grouping the faces by the country name +using Countries_dcel = CGAL::Arr_face_extended_dcel; +using Countries_topol_traits = + CGAL::Arr_spherical_topology_traits_2; +using Countries_arr = + CGAL::Arrangement_on_surface_2; + + +#endif diff --git a/Arrangement_on_surface_2/demo/earth/CMakeLists.txt b/Arrangement_on_surface_2/demo/earth/CMakeLists.txt index fb47c6733ef..0f21732d5ad 100644 --- a/Arrangement_on_surface_2/demo/earth/CMakeLists.txt +++ b/Arrangement_on_surface_2/demo/earth/CMakeLists.txt @@ -53,7 +53,8 @@ link_directories(earth PRIVATE ${SHAPELIB_LIB_DIR}) # AOS file(GLOB source_files_aos - Aos.h Aos.cpp + Aos.h Aos.cpp + Aos_defs.h ) source_group( "Aos" FILES ${source_files_aos} )