diff --git a/Surface_mesh_topology/examples/Surface_mesh_topology/draw_facewidth.h b/Surface_mesh_topology/examples/Surface_mesh_topology/draw_facewidth.h index e2f781cfab8..0fe598482d0 100644 --- a/Surface_mesh_topology/examples/Surface_mesh_topology/draw_facewidth.h +++ b/Surface_mesh_topology/examples/Surface_mesh_topology/draw_facewidth.h @@ -5,7 +5,7 @@ #ifdef CGAL_USE_BASIC_VIEWER -#include +#include #include template diff --git a/Surface_mesh_topology/examples/Surface_mesh_topology/unsew_edgewidth_repeatedly.cpp b/Surface_mesh_topology/examples/Surface_mesh_topology/unsew_edgewidth_repeatedly.cpp index 485f0fa6ddc..5dc8900de23 100644 --- a/Surface_mesh_topology/examples/Surface_mesh_topology/unsew_edgewidth_repeatedly.cpp +++ b/Surface_mesh_topology/examples/Surface_mesh_topology/unsew_edgewidth_repeatedly.cpp @@ -34,83 +34,31 @@ private: #ifdef CGAL_USE_BASIC_VIEWER -struct Draw_functor +struct Draw_functor: public CGAL::Graphics_scene_options { Draw_functor(LCC_3::size_type am1, LCC_3::size_type am2) : is_root(am1), belong_to_cycle(am2) - {} + { + this->colored_vertex=[this](const LCC_3& alcc, typename LCC_3::Dart_const_handle dh)->bool + { return alcc.is_marked(dh, is_root); }; + this->vertex_color=[](const LCC_3&, typename LCC_3::Dart_const_handle)->CGAL::IO::Color + { return CGAL::IO::Color(0, 255, 0); }; - template - bool colored_vertex(const LCC& alcc, typename LCC::Dart_const_descriptor d) const - { return alcc.is_marked(d, is_root); } + this->colored_edge=[this](const LCC_3& alcc, typename LCC_3::Dart_const_handle dh)->bool + { return alcc.is_marked(dh, belong_to_cycle); }; + this->edge_color=[](const LCC_3&, typename LCC_3::Dart_const_handle)->CGAL::IO::Color + { return CGAL::IO::Color(0, 0, 255); }; - template - CGAL::IO::Color vertex_color(const LCC& /* alcc */, - typename LCC::Dart_const_descriptor /* d */) const - { return CGAL::IO::Color(0,255,0); } - - template - bool colored_edge(const LCC& alcc, typename LCC::Dart_const_descriptor d) const - { return alcc.is_marked(d, belong_to_cycle); } - - template - CGAL::IO::Color edge_color(const LCC& /* alcc*/, - typename LCC::Dart_const_descriptor /* d */) const - { return CGAL::IO::Color(0, 0, 255); } - - template - bool colored_face(const LCC& /* alcc */, - typename LCC::Dart_const_descriptor /* d */) const {return true;} - - template - CGAL::IO::Color face_color(const LCC& /* alcc */, - typename LCC::Dart_const_descriptor /* d */) const - {return CGAL::IO::Color(211, 211, 211);} - - template - bool colored_volume(const LCC& /* alcc */, - typename LCC::Dart_const_descriptor /* d */) const { return false; } - - template - bool draw_volume (const LCC& /* alcc */, - typename LCC::Dart_const_handle /* dh */) const - { return false; } - - template - bool draw_face (const LCC& /* alcc */, - typename LCC::Dart_const_handle /* dh */) const - { return false; } - - template - bool draw_edge (const LCC& /* alcc */, - typename LCC::Dart_const_handle /* dh */) const - { return false; } - - template - bool volume_wireframe (const LCC& /* alcc */, - typename LCC::Dart_const_handle /* dh */) const - { return false; } - - template - bool face_wireframe (const LCC& /* alcc */, - typename LCC::Dart_const_handle /* dh */) const - { return false; } - - template - bool draw_vertex (const LCC& /* alcc */, - typename LCC::Dart_const_handle /* dh */) const - { return false; } - - template - CGAL::IO::Color volume_color(const LCC& /* alcc */, - typename LCC::Dart_const_handle /* dh */) const { - return CGAL::IO::Color(10, 20, 20); + this->colored_face=[this](const LCC_3&, typename LCC_3::Dart_const_handle)->bool + { return true; }; + this->face_color=[](const LCC_3&, typename LCC_3::Dart_const_handle)->CGAL::IO::Color + { return CGAL::IO::Color(211, 211, 211); }; } - bool are_edges_enabled() const { return true; } - bool are_vertices_enabled() const { return true; } - bool are_faces_enabled() const { return true; } - LCC_3::size_type is_root; LCC_3::size_type belong_to_cycle; };