mirror of https://github.com/CGAL/cgal
refactor: moved Aos definitions to a separate file
This commit is contained in:
parent
c2173dd376
commit
8d99ac39ee
|
|
@ -22,13 +22,14 @@
|
|||
using json = nlohmann::ordered_json;
|
||||
|
||||
// Includes for Arrangements on Sphere (AOS)
|
||||
#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
|
||||
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
|
||||
#include <CGAL/Arrangement_on_surface_2.h>
|
||||
#include <CGAL/Arr_extended_dcel.h>
|
||||
#include <CGAL/Arr_geodesic_arc_on_sphere_traits_2.h>
|
||||
#include <CGAL/Arr_spherical_topology_traits_2.h>
|
||||
#include <CGAL/Vector_3.h>
|
||||
#include "Aos_defs.h"
|
||||
//#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
|
||||
//#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
|
||||
//#include <CGAL/Arrangement_on_surface_2.h>
|
||||
//#include <CGAL/Arr_extended_dcel.h>
|
||||
//#include <CGAL/Arr_geodesic_arc_on_sphere_traits_2.h>
|
||||
//#include <CGAL/Arr_spherical_topology_traits_2.h>
|
||||
//#include <CGAL/Vector_3.h>
|
||||
#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<Kernel>;
|
||||
using Point = Geom_traits::Point_2;
|
||||
using Curve = Geom_traits::Curve_2;
|
||||
using Topol_traits = CGAL::Arr_spherical_topology_traits_2<Geom_traits>;
|
||||
using Arrangement = CGAL::Arrangement_on_surface_2<Geom_traits, Topol_traits>;
|
||||
|
||||
// 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<Kernel>;
|
||||
// using Point = Geom_traits::Point_2;
|
||||
// using Curve = Geom_traits::Curve_2;
|
||||
// using Topol_traits = CGAL::Arr_spherical_topology_traits_2<Geom_traits>;
|
||||
// using Arrangement = CGAL::Arrangement_on_surface_2<Geom_traits, Topol_traits>;
|
||||
//
|
||||
// // 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<Geom_traits, Ext_topol_traits>;
|
||||
|
||||
// COUNTRIES AOS for grouping the faces by the country name
|
||||
using Countries_dcel = CGAL::Arr_face_extended_dcel<Geom_traits, std::string>;
|
||||
using Countries_topol_traits =
|
||||
CGAL::Arr_spherical_topology_traits_2<Geom_traits, Countries_dcel>;
|
||||
using Countries_arr =
|
||||
CGAL::Arrangement_on_surface_2<Geom_traits, Countries_topol_traits>;
|
||||
//using Countries_dcel = CGAL::Arr_face_extended_dcel<Geom_traits, std::string>;
|
||||
//using Countries_topol_traits =
|
||||
// CGAL::Arr_spherical_topology_traits_2<Geom_traits, Countries_dcel>;
|
||||
//using Countries_arr =
|
||||
// CGAL::Arrangement_on_surface_2<Geom_traits, Countries_topol_traits>;
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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 <denizdiktas@gmail.com>
|
||||
|
||||
#ifndef AOS_DEFS_H
|
||||
#define AOS_DEFS_H
|
||||
|
||||
#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
|
||||
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
|
||||
#include <CGAL/Arrangement_on_surface_2.h>
|
||||
#include <CGAL/Arr_extended_dcel.h>
|
||||
#include <CGAL/Arr_geodesic_arc_on_sphere_traits_2.h>
|
||||
#include <CGAL/Arr_spherical_topology_traits_2.h>
|
||||
#include <CGAL/Vector_3.h>
|
||||
|
||||
|
||||
//#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<Kernel>;
|
||||
using Point = Geom_traits::Point_2;
|
||||
using Curve = Geom_traits::Curve_2;
|
||||
using Topol_traits = CGAL::Arr_spherical_topology_traits_2<Geom_traits>;
|
||||
using Arrangement = CGAL::Arrangement_on_surface_2<Geom_traits, Topol_traits>;
|
||||
|
||||
// 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<Geom_traits, std::string>;
|
||||
using Countries_topol_traits =
|
||||
CGAL::Arr_spherical_topology_traits_2<Geom_traits, Countries_dcel>;
|
||||
using Countries_arr =
|
||||
CGAL::Arrangement_on_surface_2<Geom_traits, Countries_topol_traits>;
|
||||
|
||||
|
||||
#endif
|
||||
|
|
@ -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} )
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue