From c009d0f003bc7b1e88b76bd7b89c0213d2d5ea2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Grzeczkowicz?= Date: Tue, 27 Dec 2022 12:33:58 +0000 Subject: [PATCH] Simplify header --- bridge.cpp | 1 + code.cpp | 4 ++++ edge_collapse.cpp | 2 ++ header.hpp | 13 +------------ label.hpp | 2 +- main.cpp | 2 ++ path.cpp | 6 ++++++ raster.cpp | 2 ++ raster.hpp | 1 + 9 files changed, 20 insertions(+), 13 deletions(-) diff --git a/bridge.cpp b/bridge.cpp index 850ed53..3cbc77d 100644 --- a/bridge.cpp +++ b/bridge.cpp @@ -1,6 +1,7 @@ #include "header.hpp" #include "raster.hpp" +#include #include #include diff --git a/code.cpp b/code.cpp index 58d0bde..7f293aa 100644 --- a/code.cpp +++ b/code.cpp @@ -1,6 +1,10 @@ #include "header.hpp" #include "raster.hpp" +#include +#include + +#include #include #include diff --git a/edge_collapse.cpp b/edge_collapse.cpp index c1a9197..16a1477 100644 --- a/edge_collapse.cpp +++ b/edge_collapse.cpp @@ -1,6 +1,8 @@ #include "header.hpp" #include "raster.hpp" +#include + #include #include #include diff --git a/header.hpp b/header.hpp index 2d69a5f..986cbab 100644 --- a/header.hpp +++ b/header.hpp @@ -5,27 +5,18 @@ #include #include #include -#include #include #include #include #include #include #include -#include -#include -#include -#include -#include "ogrsf_frmts.h" #include #include #include #include -#include #include -#include -#include #include #include "label.hpp" @@ -37,8 +28,6 @@ typedef CGAL::Surface_mesh Surface_mesh; typedef CGAL::Polygon_2 Polygon; typedef CGAL::Exact_predicates_inexact_constructions_kernel Exact_predicates_kernel; -typedef CGAL::Arr_segment_traits_2 Traits_2; -typedef CGAL::Arrangement_2 Arrangement_2; /// A point on a skeleton struct skeletonPoint { @@ -77,4 +66,4 @@ struct skeletonPoint { } }; -#endif /* !HEADER_H_ */ \ No newline at end of file +#endif /* !HEADER_H_ */ diff --git a/label.hpp b/label.hpp index 88a9e05..f7f64ea 100644 --- a/label.hpp +++ b/label.hpp @@ -29,4 +29,4 @@ static std::array LABELS { Label(10, "swimming pool", 50, 150, 250) }; -#endif /* !LABEL_H_ */ \ No newline at end of file +#endif /* !LABEL_H_ */ diff --git a/main.cpp b/main.cpp index 4937e31..1be373f 100644 --- a/main.cpp +++ b/main.cpp @@ -1,6 +1,8 @@ #include "header.hpp" #include "raster.hpp" +#include + void save_mesh(const Surface_mesh &mesh, const Raster &raster, const char *filename); std::tuple compute_meshes(const Raster &raster); diff --git a/path.cpp b/path.cpp index 098242b..17de032 100644 --- a/path.cpp +++ b/path.cpp @@ -2,9 +2,15 @@ #include "raster.hpp" #include +#include #include #include #include +#include +#include + +typedef CGAL::Arr_segment_traits_2 Traits_2; +typedef CGAL::Arrangement_2 Arrangement_2; void save_mesh(const Surface_mesh &mesh, const Raster &raster, const char *filename); diff --git a/raster.cpp b/raster.cpp index 356f7bb..17bad1d 100644 --- a/raster.cpp +++ b/raster.cpp @@ -1,5 +1,7 @@ #include "raster.hpp" +#include + std::pair Raster::grid_conversion(int P, int L, double grid_to_crs[6], OGRCoordinateTransformation *crs_to_other_crs, double other_grid_to_other_crs[6]) { double x = grid_to_crs[0] + (0.5 + P)*grid_to_crs[1] + (0.5 + L)*grid_to_crs[2]; double y = grid_to_crs[3] + (0.5 + P)*grid_to_crs[4] + (0.5 + L)*grid_to_crs[5]; diff --git a/raster.hpp b/raster.hpp index 7c9c8cc..9723df1 100644 --- a/raster.hpp +++ b/raster.hpp @@ -2,6 +2,7 @@ #define RASTER_H_ #include "header.hpp" +#include class Raster { public: