diff options
Diffstat (limited to 'src/GudhUI')
-rw-r--r-- | src/GudhUI/CMakeLists.txt | 20 | ||||
-rw-r--r-- | src/GudhUI/model/Model.h | 6 | ||||
-rw-r--r-- | src/GudhUI/utils/Is_manifold.h | 2 | ||||
-rw-r--r-- | src/GudhUI/utils/K_nearest_builder.h | 10 | ||||
-rw-r--r-- | src/GudhUI/view/Viewer_instructor.cpp | 2 | ||||
-rw-r--r-- | src/GudhUI/view/Viewer_instructor.h | 4 |
6 files changed, 11 insertions, 33 deletions
diff --git a/src/GudhUI/CMakeLists.txt b/src/GudhUI/CMakeLists.txt index 71f4fd1a..1ee43d91 100644 --- a/src/GudhUI/CMakeLists.txt +++ b/src/GudhUI/CMakeLists.txt @@ -1,7 +1,6 @@ cmake_minimum_required(VERSION 2.8) project(GudhUI) -find_package(CGAL COMPONENTS Qt4) find_package(Qt4) find_package(QGLViewer) find_package(OpenGL) @@ -14,27 +13,8 @@ if ( CGAL_FOUND AND QT4_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND ) SET(Boost_USE_STATIC_LIBS ON) SET(Boost_USE_MULTITHREAD OFF) - INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS}) - LINK_DIRECTORIES(${Boost_LIBRARY_DIRS}) - include(${QT_USE_FILE}) - include(${CGAL_USE_FILE}) - # In CMakeLists.txt, when include(${CGAL_USE_FILE}), CXX_FLAGS are overwritten. - # cf. http://doc.cgal.org/latest/Manual/installation.html#title40 - # A workaround is to add "-std=c++11" again. - # A fix would be to use https://cmake.org/cmake/help/v3.1/prop_gbl/CMAKE_CXX_KNOWN_FEATURES.html - # or even better https://cmake.org/cmake/help/v3.1/variable/CMAKE_CXX_STANDARD.html - # but it implies to use cmake version 3.1 at least. - if(NOT MSVC) - include(CheckCXXCompilerFlag) - CHECK_CXX_COMPILER_FLAG(-std=c++11 COMPILER_SUPPORTS_CXX11) - if(COMPILER_SUPPORTS_CXX11) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") - endif() - endif() - # - End of workaround - include_directories (${QGLVIEWER_INCLUDE_DIR}) include_directories(.) diff --git a/src/GudhUI/model/Model.h b/src/GudhUI/model/Model.h index d78cbad9..07a67a0c 100644 --- a/src/GudhUI/model/Model.h +++ b/src/GudhUI/model/Model.h @@ -249,7 +249,7 @@ class Model { int euler = 0; int dimension = 0; Clock clock; - for (const auto &s : complex_.simplex_range()) { + for (const auto &s : complex_.complex_simplex_range()) { num_simplices++; dimension = (std::max)(s.dimension(), dimension); if (s.dimension() % 2 == 0) @@ -281,7 +281,7 @@ class Model { unsigned num_simplices = 0; int euler = 0; int dimension = 0; - for (const auto &s : complex_.simplex_range()) { + for (const auto &s : complex_.complex_simplex_range()) { num_simplices++; dimension = (std::max)(s.dimension(), dimension); if (s.dimension() % 2 == 0) @@ -328,7 +328,7 @@ class Model { void save_complex_in_file_for_chomp() { std::ofstream file; file.open("chomp.sim"); - for (const auto &s : complex_.simplex_range()) { + for (const auto &s : complex_.complex_simplex_range()) { bool first = true; file << "("; for (auto x : s) { diff --git a/src/GudhUI/utils/Is_manifold.h b/src/GudhUI/utils/Is_manifold.h index b6b19ee0..0640ea47 100644 --- a/src/GudhUI/utils/Is_manifold.h +++ b/src/GudhUI/utils/Is_manifold.h @@ -69,7 +69,7 @@ template<typename SkBlComplex> class Is_manifold { private: unsigned local_dimension(Vertex_handle v) { unsigned dim = 0; - for (const auto& s : input_complex_.simplex_range(v)) + for (const auto& s : input_complex_.star_simplex_range(v)) dim = (std::max)(dim, (unsigned) s.dimension()); return dim; } diff --git a/src/GudhUI/utils/K_nearest_builder.h b/src/GudhUI/utils/K_nearest_builder.h index cab24b7c..7be0a4f4 100644 --- a/src/GudhUI/utils/K_nearest_builder.h +++ b/src/GudhUI/utils/K_nearest_builder.h @@ -29,12 +29,10 @@ #include <CGAL/Search_traits_d.h> #include <CGAL/Search_traits_adapter.h> #include <CGAL/property_map.h> -#include <boost/iterator/iterator_facade.hpp> -#include <boost/iterator/zip_iterator.hpp> #include <unordered_map> -#include <tuple> #include <list> +#include <utility> #include "utils/UI_utils.h" #include "model/Complex_typedefs.h" @@ -43,9 +41,9 @@ template<typename SkBlComplex> class K_nearest_builder { private: typedef Geometry_trait Kernel; typedef Point Point_d; - typedef boost::tuple<Point_d, unsigned> Point_d_with_id; + typedef std::pair<Point_d, unsigned> Point_d_with_id; typedef CGAL::Search_traits_d<Kernel> Traits_base; - typedef CGAL::Search_traits_adapter<Point_d_with_id, CGAL::Nth_of_tuple_property_map<0, Point_d_with_id>, + typedef CGAL::Search_traits_adapter<Point_d_with_id, CGAL::First_of_pair_property_map<Point_d_with_id>, Traits_base> Traits; typedef CGAL::Orthogonal_k_neighbor_search<Traits> Neighbor_search; typedef Neighbor_search::Tree Tree; @@ -81,7 +79,7 @@ template<typename SkBlComplex> class K_nearest_builder { for (auto p : complex_.vertex_range()) { Neighbor_search search(tree, complex_.point(p), k + 1); for (auto it = ++search.begin(); it != search.end(); ++it) { - Vertex_handle q(boost::get<1>(it->first)); + Vertex_handle q(std::get<1>(it->first)); if (p != q && complex_.contains_vertex(p) && complex_.contains_vertex(q)) complex_.add_edge(p, q); } diff --git a/src/GudhUI/view/Viewer_instructor.cpp b/src/GudhUI/view/Viewer_instructor.cpp index 4446d209..1ddd4d8b 100644 --- a/src/GudhUI/view/Viewer_instructor.cpp +++ b/src/GudhUI/view/Viewer_instructor.cpp @@ -159,7 +159,7 @@ void Viewer_instructor::set_color_edge(Edge_handle eh) { viewer_->set_color(Color(view_params_.light_edges, view_params_.light_edges, view_params_.light_edges)); } -void Viewer_instructor::set_color_triangle(const Simplex_handle& triangle) { +void Viewer_instructor::set_color_triangle(const Simplex& triangle) { viewer_->set_color(Color(view_params_.light_triangles, view_params_.light_triangles, view_params_.light_triangles)); } diff --git a/src/GudhUI/view/Viewer_instructor.h b/src/GudhUI/view/Viewer_instructor.h index 31a1d273..82c8e346 100644 --- a/src/GudhUI/view/Viewer_instructor.h +++ b/src/GudhUI/view/Viewer_instructor.h @@ -52,7 +52,7 @@ class Viewer_instructor : public QWidget { typedef Complex::Point Point;
typedef Complex::Vertex_handle Vertex_handle;
typedef Complex::Edge_handle Edge_handle;
- typedef Complex::Simplex_handle Simplex_handle;
+ typedef Complex::Simplex Simplex;
Viewer* viewer_;
View_parameter view_params_;
@@ -98,7 +98,7 @@ class Viewer_instructor : public QWidget { void set_color_vertex(Vertex_handle vh);
void set_color_edge(Edge_handle eh);
- void set_color_triangle(const Simplex_handle& triangle);
+ void set_color_triangle(const Simplex& triangle);
private:
/**
|