diff --git a/BGL/include/CGAL/draw_face_graph.h b/BGL/include/CGAL/draw_face_graph.h index 20f4cf12899..f7d95b45d35 100644 --- a/BGL/include/CGAL/draw_face_graph.h +++ b/BGL/include/CGAL/draw_face_graph.h @@ -119,7 +119,7 @@ void compute_elements(const FG &fg, } // draw_function_for_FG template -void add_in_graphics_scene_for_fg(const FG &fg, +void add_to_graphics_scene_for_fg(const FG &fg, CGAL::Graphics_scene &graphics_scene, const GSOptions &gs_options) { @@ -127,7 +127,7 @@ void add_in_graphics_scene_for_fg(const FG &fg, } template -void add_in_graphics_scene_for_fg(const FG &fg, +void add_to_graphics_scene_for_fg(const FG &fg, CGAL::Graphics_scene &graphics_scene) { Graphics_scene_options + +template void compute_loop(const typename PS2::Polygon_2& p, bool hole, CGAL::Graphics_scene& gs, const GSOptions& gso) { if (hole) { gs.add_point_in_face(p.vertex(p.size()-1)); } - + auto prev = p.vertices_begin(); auto it = prev; gs.add_point(*it); @@ -65,22 +65,22 @@ void compute_loop(const typename PS2::Polygon_2& p, bool hole, gs.add_point_in_face(*it); // add point in face prev = it; } - + // Add the last segment between the last point and the first one gs.add_segment(*prev, *(p.vertices_begin())); } /// Compute the elements of a polygon with holes. -template +template void compute_elements(const PWH& pwh, CGAL::Graphics_scene& gs, const GSOptions& gso) { if (!gso.draw_unbounded() && pwh.outer_boundary().is_empty()) return; - + CGAL::IO::Color c(75,160,255); gs.face_begin(c); - + const typename PWH::Point_2* point_in_face; if (pwh.outer_boundary().is_empty()) { @@ -104,12 +104,12 @@ void compute_elements(const PWH& pwh, compute_loop(*it, true, gs); gs.add_point_in_face(*point_in_face); } - + gs.face_end(); } - + } // End namespace draw_function_for_boolean_set_2 - + #ifdef CGAL_USE_BASIC_VIEWER template @@ -218,7 +218,7 @@ void draw(const CGAL::Polygon_set_2& ps, bool cgal_test_suite = qEnvironmentVariableIsSet("CGAL_TEST_SUITE"); #endif - if (! cgal_test_suite) + if (! cgal_test_suite) { using Ps = CGAL::Polygon_set_2; using Viewer = Polygon_set_2_basic_viewer_qt; diff --git a/Linear_cell_complex/doc/Linear_cell_complex/CGAL/draw_linear_cell_complex.h b/Linear_cell_complex/doc/Linear_cell_complex/CGAL/draw_linear_cell_complex.h index f42aa4256d0..6f6041e9400 100644 --- a/Linear_cell_complex/doc/Linear_cell_complex/CGAL/draw_linear_cell_complex.h +++ b/Linear_cell_complex/doc/Linear_cell_complex/CGAL/draw_linear_cell_complex.h @@ -21,7 +21,6 @@ Linking with the cmake target `CGAL::CGAL_Basic_viewer` will link with `CGAL_Qt5 Add in the given graphics scene the elements of alcc. \tparam LCC a model of the `LinearCellComplex` concept. -\tparam BufferType the number type used for point coordinates: `float` by default. \tparam GSOptions a class having the same methods than `Graphics_scene_options`: `Graphics_scene_options` by default. \param alcc the linear cell complex to draw. @@ -29,8 +28,8 @@ Add in the given graphics scene the elements of alcc. \param gs_options graphics scene options. */ - template - void add_in_graphics_scene(const LCC& alcc, CGAL::Graphics_scene& graphics_scene, + template + void add_to_graphics_scene(const LCC& alcc, CGAL::Graphics_scene& graphics_scene, const GSOptions& gs_options=GSOptions()); } /* namespace CGAL */ diff --git a/Linear_cell_complex/include/CGAL/draw_linear_cell_complex.h b/Linear_cell_complex/include/CGAL/draw_linear_cell_complex.h index b80d10549b8..bb21109dcea 100644 --- a/Linear_cell_complex/include/CGAL/draw_linear_cell_complex.h +++ b/Linear_cell_complex/include/CGAL/draw_linear_cell_complex.h @@ -57,7 +57,7 @@ struct LCC_geom_utils } }; -template +template void compute_face(const LCC& lcc, typename LCC::Dart_const_handle dh, typename LCC::Dart_const_handle voldh, @@ -102,7 +102,7 @@ void compute_face(const LCC& lcc, graphics_scene.face_end(); } -template +template void compute_edge(const LCC& lcc, typename LCC::Dart_const_handle dh, CGAL::Graphics_scene& graphics_scene, @@ -126,7 +126,7 @@ void compute_edge(const LCC& lcc, } } -template +template void compute_vertex(const LCC& lcc, typename LCC::Dart_const_handle dh, CGAL::Graphics_scene& graphics_scene, @@ -145,7 +145,7 @@ void compute_vertex(const LCC& lcc, { graphics_scene.add_point(lcc.point(dh)); } } -template +template void compute_elements(const LCC& lcc, CGAL::Graphics_scene& graphics_scene, const GSOptions& gs_options) @@ -232,14 +232,14 @@ void compute_elements(const LCC& lcc, CGAL::Linear_cell_complex_base -// add_in_graphics_scene: to add a LCC in the given graphic buffer, with a +// add_to_graphics_scene: to add a LCC in the given graphic buffer, with a // graphics scene options. template class Map, class Refs, class Storage_, - typename BufferType=float, class GSOptions> -void add_in_graphics_scene(const CGAL_LCC_TYPE& alcc, + class GSOptions> +void add_to_graphics_scene(const CGAL_LCC_TYPE& alcc, CGAL::Graphics_scene& graphics_scene, const GSOptions& gs_options) { @@ -247,13 +247,13 @@ void add_in_graphics_scene(const CGAL_LCC_TYPE& alcc, graphics_scene, gs_options); } -// add_in_graphics_scene: to add a LCC in the given graphic buffer, without a +// add_to_graphics_scene: to add a LCC in the given graphic buffer, without a // graphics scene options. Use default drawing values. template class Map, - class Refs, class Storage_, typename BufferType=float> -void add_in_graphics_scene(const CGAL_LCC_TYPE& alcc, + class Refs, class Storage_> +void add_to_graphics_scene(const CGAL_LCC_TYPE& alcc, CGAL::Graphics_scene& graphics_scene) { CGAL::Graphics_scene_options +template class Nef_Visitor { typedef typename Nef_Polyhedron::Halfedge_const_handle Halfedge_const_handle; @@ -212,7 +212,7 @@ protected: const Nef_Polyhedron& nef; }; -template +template void compute_elements(const Nef_Polyhedron &nef, CGAL::Graphics_scene &graphics_scene, const GSOptions &gs_options) @@ -223,7 +223,7 @@ void compute_elements(const Nef_Polyhedron &nef, typedef typename Nef_Polyhedron::SFace_const_handle SFace_const_handle; Volume_const_iterator c; - Nef_Visitor + Nef_Visitor V(nef, graphics_scene, gs_options); CGAL_forall_volumes(c, nef) { @@ -239,10 +239,10 @@ void compute_elements(const Nef_Polyhedron &nef, #define CGAL_NEF3_TYPE Nef_polyhedron_3 -// add_in_graphics_scene +// add_to_graphics_scene template -void add_in_graphics_scene(const CGAL_NEF3_TYPE &anef, + class GSOptions> +void add_to_graphics_scene(const CGAL_NEF3_TYPE &anef, CGAL::Graphics_scene &graphics_scene, const GSOptions &gs_options) { @@ -251,9 +251,8 @@ void add_in_graphics_scene(const CGAL_NEF3_TYPE &anef, gs_options); } -template -void add_in_graphics_scene(const CGAL_NEF3_TYPE &anef, +template +void add_to_graphics_scene(const CGAL_NEF3_TYPE &anef, CGAL::Graphics_scene &graphics_scene) { // Default graphics view options. @@ -277,30 +276,29 @@ void add_in_graphics_scene(const CGAL_NEF3_TYPE &anef, return get_random_color(random); }; - add_in_graphics_scene(anef, graphics_scene, gs_options); + add_to_graphics_scene(anef, graphics_scene, gs_options); } #ifdef CGAL_USE_BASIC_VIEWER // Specialization of draw function template + class GSOptions> void draw(const CGAL_NEF3_TYPE &anef, const GSOptions &gs_options, const char *title="Nef Polyhedron Viewer") { CGAL::Graphics_scene buffer; - add_in_graphics_scene(anef, buffer, gs_options); + add_to_graphics_scene(anef, buffer, gs_options); draw_graphics_scene(buffer, title); } -template +template void draw(const CGAL_NEF3_TYPE &anef, const char *title="Nef Polyhedron Viewer") { CGAL::Graphics_scene buffer; - add_in_graphics_scene(anef, buffer); + add_to_graphics_scene(anef, buffer); draw_graphics_scene(buffer, title); } diff --git a/Periodic_2_triangulation_2/include/CGAL/draw_periodic_2_triangulation_2.h b/Periodic_2_triangulation_2/include/CGAL/draw_periodic_2_triangulation_2.h index fb86c03e7a0..e11fb2baaff 100644 --- a/Periodic_2_triangulation_2/include/CGAL/draw_periodic_2_triangulation_2.h +++ b/Periodic_2_triangulation_2/include/CGAL/draw_periodic_2_triangulation_2.h @@ -66,7 +66,7 @@ protected: namespace draw_function_for_P2T2 { -template +template void compute_vertex(const P2T2 &p2t2, typename P2T2::Periodic_point_iterator pi, CGAL::Graphics_scene& graphics_scene, @@ -83,7 +83,7 @@ void compute_vertex(const P2T2 &p2t2, { graphics_scene.add_point(p2t2.point(*pi)); } } -template +template void compute_edge(const P2T2 &p2t2, typename P2T2::Periodic_segment_iterator si, CGAL::Graphics_scene& graphics_scene, @@ -101,7 +101,7 @@ void compute_edge(const P2T2 &p2t2, { graphics_scene.add_segment(s[0], s[1]); } } -template +template void compute_face(const P2T2 &p2t2, typename P2T2::Periodic_triangle_iterator ti, CGAL::Graphics_scene& graphics_scene, @@ -124,7 +124,7 @@ void compute_face(const P2T2 &p2t2, graphics_scene.face_end(); } -template +template void compute_domain(const P2T2& p2t2, CGAL::Graphics_scene& graphics_scene, const GSOptions& gs_options) @@ -153,7 +153,7 @@ void compute_domain(const P2T2& p2t2, } } -template +template void compute_elements(const P2T2& p2t2, CGAL::Graphics_scene& graphics_scene, const GSOptions& gs_options) @@ -196,16 +196,16 @@ void compute_elements(const P2T2& p2t2, #define CGAL_P2T2_TYPE CGAL::Periodic_2_triangulation_2 -template -void add_in_graphics_scene(const CGAL_P2T2_TYPE& p2t2, +template +void add_to_graphics_scene(const CGAL_P2T2_TYPE& p2t2, CGAL::Graphics_scene& graphics_scene, const GSOptions& gs_options) { draw_function_for_P2T2::compute_elements(p2t2, graphics_scene, gs_options); } -template -void add_in_graphics_scene(const CGAL_P2T2_TYPE& p2t2, +template +void add_to_graphics_scene(const CGAL_P2T2_TYPE& p2t2, CGAL::Graphics_scene& graphics_scene) { CGAL::Graphics_scene_options_periodic_2_triangulation_2 @@ -214,23 +214,23 @@ void add_in_graphics_scene(const CGAL_P2T2_TYPE& p2t2, typename CGAL_P2T2_TYPE::Periodic_segment_iterator, typename CGAL_P2T2_TYPE::Periodic_triangle_iterator> gs_options; - add_in_graphics_scene(p2t2, graphics_scene, gs_options); + add_to_graphics_scene(p2t2, graphics_scene, gs_options); } #ifdef CGAL_USE_BASIC_VIEWER // Specialization of draw function -template +template void draw(const CGAL_P2T2_TYPE& ap2t2, const GSOptions& gs_options, const char* title="2D Periodic Triangulation Viewer") { CGAL::Graphics_scene buffer; - add_in_graphics_scene(ap2t2, buffer, gs_options); + add_to_graphics_scene(ap2t2, buffer, gs_options); draw_graphics_scene(buffer); } -template +template void draw(const CGAL_P2T2_TYPE& ap2t2, const char* title="2D Periodic Triangulation Viewer") { @@ -241,7 +241,7 @@ void draw(const CGAL_P2T2_TYPE& ap2t2, typename CGAL_P2T2_TYPE::Periodic_segment_iterator, typename CGAL_P2T2_TYPE::Periodic_triangle_iterator> gs_options; - add_in_graphics_scene(ap2t2, buffer, gs_options); + add_to_graphics_scene(ap2t2, buffer, gs_options); QApplication_and_basic_viewer app(buffer, title); if(app) { diff --git a/Point_set_3/include/CGAL/draw_point_set_3.h b/Point_set_3/include/CGAL/draw_point_set_3.h index c1f9ccbcca6..13fefed8a39 100644 --- a/Point_set_3/include/CGAL/draw_point_set_3.h +++ b/Point_set_3/include/CGAL/draw_point_set_3.h @@ -69,7 +69,7 @@ void compute_elements(const PointSet& pointset, } // namespace draw_function_for_PointSet template -void add_in_graphics_scene(const Point_set_3& apointset, +void add_to_graphics_scene(const Point_set_3& apointset, Graphics_scene& graphics_scene, const GSOptions& gs_options) { @@ -79,13 +79,13 @@ void add_in_graphics_scene(const Point_set_3& apointset, } template -void add_in_graphics_scene(const Point_set_3& apointset, +void add_to_graphics_scene(const Point_set_3& apointset, Graphics_scene& graphics_scene) { CGAL::Graphics_scene_options, typename Point_set_3::const_iterator, int, int> gs_options; - add_in_graphics_scene(apointset, graphics_scene, gs_options); + add_to_graphics_scene(apointset, graphics_scene, gs_options); } #ifdef CGAL_USE_BASIC_VIEWER @@ -97,7 +97,7 @@ void draw(const Point_set_3& apointset, const char *title="Point_set_3 Basic Viewer") { Graphics_scene buffer; - add_in_graphics_scene(apointset, buffer, gs_options); + add_to_graphics_scene(apointset, buffer, gs_options); draw_graphics_scene(buffer, title); } @@ -106,7 +106,7 @@ void draw(const Point_set_3& apointset, const char *title="Point_set_3 Basic Viewer") { Graphics_scene buffer; - add_in_graphics_scene(apointset, buffer); + add_to_graphics_scene(apointset, buffer); draw_graphics_scene(buffer, title); } diff --git a/Polygon/include/CGAL/draw_polygon_2.h b/Polygon/include/CGAL/draw_polygon_2.h index 8184f6258b8..971c84ddce4 100644 --- a/Polygon/include/CGAL/draw_polygon_2.h +++ b/Polygon/include/CGAL/draw_polygon_2.h @@ -46,7 +46,7 @@ namespace CGAL { namespace draw_function_for_p2 { -template +template void compute_elements(const P2& p2, CGAL::Graphics_scene &graphics_scene, const GSOptions& gs_options) @@ -99,16 +99,16 @@ void compute_elements(const P2& p2, #define CGAL_P2_TYPE CGAL::Polygon_2 -// Specializations of add_in_graphics_scene function +// Specializations of add_to_graphics_scene function -template -void add_in_graphics_scene(const CGAL_P2_TYPE& ap2, +template +void add_to_graphics_scene(const CGAL_P2_TYPE& ap2, CGAL::Graphics_scene& graphics_scene, const GSOptions& gs_options) { draw_function_for_p2::compute_elements(ap2, graphics_scene, gs_options); } -template -void add_in_graphics_scene(const CGAL_P2_TYPE& ap2, +template +void add_to_graphics_scene(const CGAL_P2_TYPE& ap2, CGAL::Graphics_scene &graphics_scene) { CGAL::Graphics_scene_options +template void compute_one_loop_elements(const P2& ap2, const typename P2::General_polygon_2& aloop, Graphics_scene &graphics_scene, @@ -97,7 +97,7 @@ void compute_one_loop_elements(const P2& ap2, { graphics_scene.add_segment(*prev, *(aloop.vertices_begin())); } } -template +template void compute_elements(const P2& p2, Graphics_scene &graphics_scene, const GSOptions& gs_options) { @@ -111,13 +111,13 @@ void compute_elements(const P2& p2, Graphics_scene &graphics_scene, { graphics_scene.face_begin(); } } - compute_one_loop_elements(p2, p2.outer_boundary(), graphics_scene, - false, gs_options); + compute_one_loop_elements(p2, p2.outer_boundary(), graphics_scene, + false, gs_options); for (typename P2::Hole_const_iterator it=p2.holes_begin(); it!=p2.holes_end(); ++it) { - compute_one_loop_elements(p2, *it, graphics_scene, - true, gs_options); + compute_one_loop_elements(p2, *it, graphics_scene, + true, gs_options); if (gs_options.are_faces_enabled()) { graphics_scene.add_point_in_face(p2.outer_boundary().vertex (p2.outer_boundary().size()-1)); @@ -132,8 +132,8 @@ void compute_elements(const P2& p2, Graphics_scene &graphics_scene, #define CGAL_P2_WITH_HOLES_TYPE CGAL::Polygon_with_holes_2 -template -void add_in_graphics_scene(const CGAL_P2_WITH_HOLES_TYPE& p2, +template +void add_to_graphics_scene(const CGAL_P2_WITH_HOLES_TYPE& p2, CGAL::Graphics_scene& graphics_scene, const GSOptions &gs_options) { @@ -141,8 +141,8 @@ void add_in_graphics_scene(const CGAL_P2_WITH_HOLES_TYPE& p2, gs_options); } -template -void add_in_graphics_scene(const CGAL_P2_WITH_HOLES_TYPE& p2, +template +void add_to_graphics_scene(const CGAL_P2_WITH_HOLES_TYPE& p2, CGAL::Graphics_scene& graphics_scene) { Graphics_scene_options gs_options; - add_in_graphics_scene(p2, graphics_scene, gs_options); + add_to_graphics_scene(p2, graphics_scene, gs_options); } #ifdef CGAL_USE_BASIC_VIEWER // Specialization of draw function. -template +template void draw(const CGAL_P2_WITH_HOLES_TYPE& ap2, const GSOptions &gs_options, const char* title="Polygon with Holes Basic Viewer") { CGAL::Graphics_scene buffer; - add_in_graphics_scene(ap2, buffer, gs_options); + add_to_graphics_scene(ap2, buffer, gs_options); draw_graphics_scene(buffer, title); } -template +template void draw(const CGAL_P2_WITH_HOLES_TYPE& ap2, const char* title="Polygon with Holes Basic Viewer") { CGAL::Graphics_scene buffer; - add_in_graphics_scene(ap2, buffer); + add_to_graphics_scene(ap2, buffer); draw_graphics_scene(buffer, title); } diff --git a/Polyhedron/include/CGAL/draw_polyhedron.h b/Polyhedron/include/CGAL/draw_polyhedron.h index 5043f0d7ef7..37d090cabb7 100644 --- a/Polyhedron/include/CGAL/draw_polyhedron.h +++ b/Polyhedron/include/CGAL/draw_polyhedron.h @@ -26,26 +26,26 @@ namespace CGAL #define CGAL_POLY_TYPE CGAL::Polyhedron_3 \ -// Specialization of add_in_graphics_scene function. +// Specialization of add_to_graphics_scene function. template class T_HDS, class Alloc, class GSOptions> -void add_in_graphics_scene(const CGAL_POLY_TYPE& apoly, +void add_to_graphics_scene(const CGAL_POLY_TYPE& apoly, CGAL::Graphics_scene &graphics_scene, const GSOptions &gs_options) -{ add_in_graphics_scene_for_fg(apoly, graphics_scene, gs_options); } +{ add_to_graphics_scene_for_fg(apoly, graphics_scene, gs_options); } template class T_HDS, class Alloc> -void add_in_graphics_scene(const CGAL_POLY_TYPE& apoly, +void add_to_graphics_scene(const CGAL_POLY_TYPE& apoly, CGAL::Graphics_scene &graphics_scene) -{ add_in_graphics_scene_for_fg(apoly, graphics_scene); } +{ add_to_graphics_scene_for_fg(apoly, graphics_scene); } // Specialization of draw function: require Qt and the CGAL basic viewer. #ifdef CGAL_USE_BASIC_VIEWER @@ -59,7 +59,7 @@ void draw(const CGAL_POLY_TYPE& apoly, const char* title="Polyhedron Basic Viewer") { CGAL::Graphics_scene buffer; - add_in_graphics_scene_for_fg(apoly, buffer); + add_to_graphics_scene_for_fg(apoly, buffer); draw_graphics_scene(buffer, title); } @@ -74,7 +74,7 @@ void draw(const CGAL_POLY_TYPE& apoly, const char* title="Polyhedron Basic Viewer") { CGAL::Graphics_scene buffer; - add_in_graphics_scene_for_fg(apoly, buffer, gs_options); + add_to_graphics_scene_for_fg(apoly, buffer, gs_options); draw_graphics_scene(buffer, title); } #endif // CGAL_USE_BASIC_VIEWER diff --git a/Straight_skeleton_2/include/CGAL/draw_straight_skeleton_2.h b/Straight_skeleton_2/include/CGAL/draw_straight_skeleton_2.h index 104a4fa52cb..d4766f5a903 100644 --- a/Straight_skeleton_2/include/CGAL/draw_straight_skeleton_2.h +++ b/Straight_skeleton_2/include/CGAL/draw_straight_skeleton_2.h @@ -24,7 +24,7 @@ namespace CGAL { namespace draw_function_for_ss2 { -template +template void compute_edge(const SS2& ss2, typename SS2::Halfedge_const_handle eh, CGAL::Graphics_scene& graphics_scene, const GSOptions& gs_options) @@ -45,7 +45,7 @@ void compute_edge(const SS2& ss2, typename SS2::Halfedge_const_handle eh, } } -template +template void print_halfedge_labels(const SS2& ss2, typename SS2::Halfedge_const_handle h, CGAL::Graphics_scene& graphics_scene, @@ -65,7 +65,7 @@ void print_halfedge_labels(const SS2& ss2, label.str()); } -template +template void compute_vertex(const SS2& ss2, typename SS2::Vertex_const_handle vh, CGAL::Graphics_scene& graphics_scene, const GSOptions& gs_options) @@ -81,7 +81,7 @@ void compute_vertex(const SS2& ss2, typename SS2::Vertex_const_handle vh, { graphics_scene.add_point(vh->point()); } } -template +template void print_vertex_label(const SS2& ss2, typename SS2::Vertex_const_handle vh, CGAL::Graphics_scene& graphics_scene, @@ -96,7 +96,7 @@ void print_vertex_label(const SS2& ss2, graphics_scene.add_text(vh->point(), label.str()); } -template +template void compute_elements(const SS2& ss2, CGAL::Graphics_scene& graphics_scene, const GSOptions& gs_options) @@ -129,8 +129,8 @@ void compute_elements(const SS2& ss2, #define CGAL_SS_TYPE CGAL::Straight_skeleton_2 -template -void add_in_graphics_scene(const CGAL_SS_TYPE &ass2, +template +void add_to_graphics_scene(const CGAL_SS_TYPE &ass2, CGAL::Graphics_scene& graphics_scene, const GSOptions& gs_options) { @@ -138,8 +138,8 @@ void add_in_graphics_scene(const CGAL_SS_TYPE &ass2, gs_options); } -template -void add_in_graphics_scene(const CGAL_SS_TYPE& ass2, +template +void add_to_graphics_scene(const CGAL_SS_TYPE& ass2, CGAL::Graphics_scene& graphics_scene) { Graphics_scene_options -void add_in_graphics_scene(const Surface_mesh& amesh, +void add_to_graphics_scene(const Surface_mesh& amesh, CGAL::Graphics_scene &graphics_scene, const GSOptions &gs_options) -{ add_in_graphics_scene_for_fg(amesh, graphics_scene, gs_options); } +{ add_to_graphics_scene_for_fg(amesh, graphics_scene, gs_options); } template -void add_in_graphics_scene(const Surface_mesh& amesh, +void add_to_graphics_scene(const Surface_mesh& amesh, CGAL::Graphics_scene &graphics_scene) -{ add_in_graphics_scene_for_fg(amesh, graphics_scene, +{ add_to_graphics_scene_for_fg(amesh, graphics_scene, Graphics_scene_options_surface_mesh(amesh)); } #ifdef CGAL_USE_BASIC_VIEWER @@ -114,7 +114,7 @@ void draw(const Surface_mesh& amesh, const char* title="Surface_mesh Basic Viewer") { CGAL::Graphics_scene buffer; - add_in_graphics_scene(amesh, buffer); + add_to_graphics_scene(amesh, buffer); draw_graphics_scene(buffer, title); } @@ -124,7 +124,7 @@ void draw(const Surface_mesh& amesh, const char* title="Surface_mesh Basic Viewer") { CGAL::Graphics_scene buffer; - add_in_graphics_scene(amesh, buffer, gs_options); + add_to_graphics_scene(amesh, buffer, gs_options); draw_graphics_scene(buffer, title); } diff --git a/Surface_mesh_topology/include/CGAL/draw_face_graph_with_paths.h b/Surface_mesh_topology/include/CGAL/draw_face_graph_with_paths.h index d354ab74531..837fd33f908 100644 --- a/Surface_mesh_topology/include/CGAL/draw_face_graph_with_paths.h +++ b/Surface_mesh_topology/include/CGAL/draw_face_graph_with_paths.h @@ -141,7 +141,7 @@ const typename CGAL::Get_traits::Point& get_point return CGAL::Get_traits::get_point(mesh, dh); } -template +template void compute_face(const Mesh& mesh, const typename Get_map::storage_type& lcc, typename Get_map::type::Dart_const_descriptor dh, @@ -188,7 +188,7 @@ void compute_face(const Mesh& mesh, graphics_scene.face_end(); } -template +template void compute_edge(const Mesh &mesh, const typename Get_map::storage_type& lcc, typename Get_map::type::Dart_const_descriptor dh, @@ -219,7 +219,7 @@ void compute_edge(const Mesh &mesh, } } -template +template void compute_edge(const Mesh &mesh, const typename Get_map::storage_type& lcc, typename Get_map::type::Dart_const_descriptor dh, @@ -238,7 +238,7 @@ void compute_edge(const Mesh &mesh, { graphics_scene.add_segment(p1, get_point(mesh, d2), color); } } -template +template void compute_vertex(const Mesh &mesh, typename Get_map::type::Dart_const_descriptor dh, CGAL::Graphics_scene& graphics_scene, @@ -250,7 +250,7 @@ void compute_vertex(const Mesh &mesh, graphics_scene.add_point(get_point(mesh, dh)); } -template +template void compute_path(const Mesh &mesh, const typename Get_map::storage_type& lcc, CGAL::Graphics_scene &graphics_scene, @@ -280,7 +280,7 @@ void compute_path(const Mesh &mesh, } } -template +template void compute_elements(const Mesh &mesh, CGAL::Graphics_scene &graphics_scene, const GSOptions &m_gs_options, @@ -311,19 +311,19 @@ void compute_elements(const Mesh &mesh, if (m_current_dart!=lcc.darts().end()) { // We want to draw only one dart Dart_const_descriptor selected_dart=m_current_dart; //lcc.dart_handle(m_current_dart); - compute_edge(selected_dart, CGAL::IO::Color(255,0,0), mesh, graphics_scene, lcc); + compute_edge(selected_dart, CGAL::IO::Color(255,0,0), mesh, graphics_scene, lcc); lcc.template mark_cell<1>(selected_dart, markedges); - compute_vertex(selected_dart, mesh, graphics_scene); + compute_vertex(selected_dart, mesh, graphics_scene); if ( !m_nofaces ) - { compute_face(selected_dart, mesh, graphics_scene, lcc); } + { compute_face(selected_dart, mesh, graphics_scene, lcc); } for (typename LCC::Dart_range::const_iterator it=lcc.darts().begin(), itend=lcc.darts().end(); it!=itend; ++it ) { if ( !lcc.is_marked(it, markedges) ) { - compute_edge(it, mesh, graphics_scene, lcc, m_amark, m_draw_marked_darts); + compute_edge(it, mesh, graphics_scene, lcc, m_amark, m_draw_marked_darts); lcc.template mark_cell<1>(it, markedges); } } @@ -333,10 +333,10 @@ void compute_elements(const Mesh &mesh, if (m_current_path==m_paths->size()) { for (std::size_t i=0; isize(); ++i) - { compute_path(i, markedges, mesh, graphics_scene, m_paths, lcc); } + { compute_path(i, markedges, mesh, graphics_scene, m_paths, lcc); } } else if (m_current_path!=m_paths->size()+1) - { compute_path(m_current_path, markedges, mesh, graphics_scene, m_paths, lcc); } + { compute_path(m_current_path, markedges, mesh, graphics_scene, m_paths, lcc); } for (typename LCC::Dart_range::const_iterator it=lcc.darts().begin(), itend=lcc.darts().end(); it!=itend; ++it ) @@ -344,19 +344,19 @@ void compute_elements(const Mesh &mesh, if (!m_nofaces && !lcc.is_marked(it, markfaces) && !lcc.is_perforated(it) && lcc.is_marked(it, m_oriented_mark)) { - compute_face(it, mesh, graphics_scene, lcc); + compute_face(it, mesh, graphics_scene, lcc); lcc.template mark_cell<2>(it, markfaces); } if ( !lcc.is_marked(it, markedges) ) { - compute_edge(it, mesh, graphics_scene, lcc, m_amark, m_draw_marked_darts); + compute_edge(it, mesh, graphics_scene, lcc, m_amark, m_draw_marked_darts); lcc.template mark_cell<1>(it, markedges); } if ( !lcc.is_marked(it, markvertices) ) { - compute_vertex(it, mesh, graphics_scene); + compute_vertex(it, mesh, graphics_scene); lcc.template mark_cell<0>(it, markvertices); } } @@ -369,8 +369,8 @@ void compute_elements(const Mesh &mesh, } // namespace draw_function_for_face_graph_with_paths -template -void add_in_graphics_scene(const Mesh& mesh, +template +void add_to_graphics_scene(const Mesh& mesh, CGAL::Graphics_scene& graphics_scene, const std::vector>* paths, const GSOptions& gs_options, @@ -383,8 +383,8 @@ void add_in_graphics_scene(const Mesh& mesh, paths, amark); } -template -void add_in_graphics_scene(const Mesh& mesh, +template +void add_to_graphics_scene(const Mesh& mesh, CGAL::Graphics_scene& graphics_scene, const std::vector>* paths, typename Get_map::type::size_type amark= @@ -397,12 +397,12 @@ void add_in_graphics_scene(const Mesh& mesh, typename Get_map::type::Dart_const_descriptor /*fh*/> gs_options; - add_in_graphics_scene(mesh, graphics_scene, gs_options, paths, amark); + add_to_graphics_scene(mesh, graphics_scene, gs_options, paths, amark); } #ifdef CGAL_USE_BASIC_VIEWER -template +template void draw(const Mesh& mesh, const std::vector >& paths, typename Get_map::type::size_type amark= @@ -410,11 +410,11 @@ void draw(const Mesh& mesh, const char* title="Mesh Viewer With Path") { CGAL::Graphics_scene buffer; - add_in_graphics_scene(mesh, buffer, &paths, amark); + add_to_graphics_scene(mesh, buffer, &paths, amark); draw_graphics_scene(buffer, title); } -template +template void draw(const Mesh& mesh, const std::vector >& paths, const GSOptions& gs_options, @@ -423,11 +423,11 @@ void draw(const Mesh& mesh, const char* title="Mesh Viewer With Path") { CGAL::Graphics_scene buffer; - add_in_graphics_scene(mesh, buffer, gs_options, &paths, amark); + add_to_graphics_scene(mesh, buffer, gs_options, &paths, amark); draw_graphics_scene(buffer, title); } -template +template void draw(const Mesh& mesh, std::initializer_list> l, typename Get_map::type::size_type amark= @@ -436,7 +436,7 @@ void draw(const Mesh& mesh, { std::vector> paths=l; CGAL::Graphics_scene buffer; - add_in_graphics_scene(mesh, buffer, &paths, amark); + add_to_graphics_scene(mesh, buffer, &paths, amark); draw_graphics_scene(buffer, title); } @@ -447,7 +447,7 @@ void draw(const Mesh& mesh, namespace CGAL { - template + template void draw(const Mesh&, const std::vector >&, typename Get_map::type::size_type= @@ -457,7 +457,7 @@ namespace CGAL std::cerr<<"Impossible to draw, CGAL_USE_BASIC_VIEWER is not defined."< + template void draw(const Mesh&, const std::vector >&, const GSOptions&, @@ -468,7 +468,7 @@ namespace CGAL std::cerr<<"Impossible to draw, CGAL_USE_BASIC_VIEWER is not defined."< + template void draw(const Mesh&, std::initializer_list>, const char* ="", diff --git a/Triangulation_2/include/CGAL/draw_constrained_triangulation_2.h b/Triangulation_2/include/CGAL/draw_constrained_triangulation_2.h index 99e6aee5727..6fc3d8f3bbe 100644 --- a/Triangulation_2/include/CGAL/draw_constrained_triangulation_2.h +++ b/Triangulation_2/include/CGAL/draw_constrained_triangulation_2.h @@ -26,8 +26,8 @@ namespace CGAL // Specialization of draw function. #define CGAL_T2_TYPE CGAL::Constrained_triangulation_2 -template -void add_in_graphics_scene(const CGAL_T2_TYPE& at2, InDomainPmap ipm, +template +void add_to_graphics_scene(const CGAL_T2_TYPE& at2, InDomainPmap ipm, CGAL::Graphics_scene& graphics_scene) { using BASET2=CGAL::Triangulation_2; @@ -54,15 +54,15 @@ void add_in_graphics_scene(const CGAL_T2_TYPE& at2, InDomainPmap ipm, [&ipm](const BASET2&, typename CGAL_T2_TYPE::Finite_faces_iterator fh) -> CGAL::IO::Color { return get(ipm, fh)? CGAL::IO::yellow() : CGAL::IO::white(); }; - add_in_graphics_scene(at2, graphics_scene, drawingFunctor); + add_to_graphics_scene(at2, graphics_scene, drawingFunctor); } -template -void add_in_graphics_scene(const CGAL_T2_TYPE& at2, +template +void add_to_graphics_scene(const CGAL_T2_TYPE& at2, CGAL::Graphics_scene& graphics_scene) { internal::In_domain in_domain; - add_in_graphics_scene(at2, in_domain, graphics_scene); + add_to_graphics_scene(at2, in_domain, graphics_scene); } template @@ -70,7 +70,7 @@ void draw(const CGAL_T2_TYPE& at2, InDomainPmap ipm, const char *title="Constrained Triangulation_2 Basic Viewer") { CGAL::Graphics_scene buffer; - add_in_graphics_scene(at2, ipm, buffer); + add_to_graphics_scene(at2, ipm, buffer); draw_graphics_scene(buffer, title); } diff --git a/Triangulation_2/include/CGAL/draw_triangulation_2.h b/Triangulation_2/include/CGAL/draw_triangulation_2.h index 747c2348e1f..702aa32cd66 100644 --- a/Triangulation_2/include/CGAL/draw_triangulation_2.h +++ b/Triangulation_2/include/CGAL/draw_triangulation_2.h @@ -24,7 +24,7 @@ namespace CGAL { namespace draw_function_for_t2 { -template +template void compute_face(const T2& t2, typename T2::Finite_faces_iterator fh, CGAL::Graphics_scene& graphics_scene, @@ -45,7 +45,7 @@ void compute_face(const T2& t2, graphics_scene.face_end(); } -template +template void compute_edge(const T2& t2, typename T2::Finite_edges_iterator eh, CGAL::Graphics_scene& graphics_scene, const GSOptions& gs_options) @@ -68,7 +68,7 @@ void compute_edge(const T2& t2, typename T2::Finite_edges_iterator eh, } } -template +template void compute_vertex(const T2& t2, typename T2::Vertex_handle vh, CGAL::Graphics_scene& graphics_scene, const GSOptions& gs_options) @@ -86,7 +86,7 @@ void compute_vertex(const T2& t2, typename T2::Vertex_handle vh, } } -template +template void compute_elements(const T2& t2, CGAL::Graphics_scene& graphics_scene, const GSOptions& gs_options) @@ -117,8 +117,8 @@ void compute_elements(const T2& t2, #define CGAL_T2_TYPE CGAL::Triangulation_2 -template -void add_in_graphics_scene(const CGAL_T2_TYPE& at2, +template +void add_to_graphics_scene(const CGAL_T2_TYPE& at2, CGAL::Graphics_scene& graphics_scene, const CGAL::Graphics_scene_options -void add_in_graphics_scene(const CGAL_T2_TYPE& at2, +template +void add_to_graphics_scene(const CGAL_T2_TYPE& at2, CGAL::Graphics_scene& graphics_scene) { Graphics_scene_options +template void compute_face(typename T3::Finite_facets_iterator fh, const GSOptions& gs_options, CGAL::Graphics_scene& graphics_scene, const T3 *t3) @@ -48,7 +48,7 @@ void compute_face(typename T3::Finite_facets_iterator fh, graphics_scene.face_end(); } -template +template void compute_edge(typename T3::Finite_edges_iterator eh, CGAL::Graphics_scene& graphics_scene, const GSOptions& gs_options, const T3* t3) @@ -68,7 +68,7 @@ void compute_edge(typename T3::Finite_edges_iterator eh, } } -template +template void compute_vertex(typename T3::Vertex_handle vh, CGAL::Graphics_scene& graphics_scene, const GSOptions& gs_options, const T3* t3) @@ -84,7 +84,7 @@ void compute_vertex(typename T3::Vertex_handle vh, { graphics_scene.add_point(vh->point()); } } -template +template void compute_elements(const T3* t3, CGAL::Graphics_scene& graphics_scene, const GSOptions& gs_options) @@ -116,17 +116,16 @@ void compute_elements(const T3* t3, #define CGAL_T3_TYPE CGAL::Triangulation_3 template -void add_in_graphics_scene(const CGAL_T3_TYPE& at3, + class GSOptions> +void add_to_graphics_scene(const CGAL_T3_TYPE& at3, CGAL::Graphics_scene& graphics_scene, const GSOptions& gs_options) { draw_function_for_t3::compute_elements(&at3, graphics_scene, gs_options); } -template -void add_in_graphics_scene(const CGAL_T3_TYPE& at3, +template +void add_to_graphics_scene(const CGAL_T3_TYPE& at3, CGAL::Graphics_scene& graphics_scene) { CGAL::Graphics_scene_options void draw(const CGAL_T3_TYPE &at3, const char *title="T3 Basic Viewer") { CGAL::Graphics_scene buffer; - add_in_graphics_scene(at3, buffer); + add_to_graphics_scene(at3, buffer); draw_graphics_scene(buffer, title); } diff --git a/Voronoi_diagram_2/include/CGAL/draw_voronoi_diagram_2.h b/Voronoi_diagram_2/include/CGAL/draw_voronoi_diagram_2.h index 2517c302a06..2a1cfba81f7 100644 --- a/Voronoi_diagram_2/include/CGAL/draw_voronoi_diagram_2.h +++ b/Voronoi_diagram_2/include/CGAL/draw_voronoi_diagram_2.h @@ -69,7 +69,7 @@ typedef CGAL::Exact_predicates_inexact_constructions_kernel Local_kernel; typedef Local_kernel::Point_3 Local_point; typedef Local_kernel::Vector_3 Local_vector; -template +template void compute_vertex(const V2& v2, typename V2::Vertex_iterator vh, CGAL::Graphics_scene& graphics_scene, @@ -84,14 +84,14 @@ void compute_vertex(const V2& v2, { graphics_scene.add_point(vh->point()); } } -template +template void compute_dual_vertex(const V2& /*v2*/, typename V2::Delaunay_graph::Finite_vertices_iterator vi, CGAL::Graphics_scene &graphics_scene, const GSOptions& gs_options) { graphics_scene.add_point(vi->point(), gs_options.dual_vertex_color); } -template +template void add_segments_and_update_bounding_box(const V2& v2, typename V2::Halfedge_iterator he, CGAL::Graphics_scene& graphics_scene, @@ -221,7 +221,7 @@ Local_kernel::Point_2 get_second_point(typename V2::Halfedge_handle ray, } // Halfedge_const_handle -template +template void compute_rays_and_bisectors(const V2&, typename V2::Halfedge_iterator he, CGAL::Graphics_scene& graphics_scene, @@ -251,7 +251,7 @@ void compute_rays_and_bisectors(const V2&, } } -template +template void compute_face(const V2& v2, typename V2::Face_iterator fh, CGAL::Graphics_scene& graphics_scene, @@ -286,7 +286,7 @@ void compute_face(const V2& v2, // } } -template +template void compute_elements(const V2& v2, CGAL::Graphics_scene& graphics_scene, const GSOptions& gs_options) @@ -335,17 +335,16 @@ void compute_elements(const V2& v2, #define CGAL_VORONOI_TYPE CGAL::Voronoi_diagram_2 -template -void add_in_graphics_scene(const CGAL_VORONOI_TYPE &v2, +template +void add_to_graphics_scene(const CGAL_VORONOI_TYPE &v2, CGAL::Graphics_scene& graphics_scene, const GSOptions& m_gs_options) { draw_function_for_v2::compute_elements(v2, graphics_scene, m_gs_options); } -template -void add_in_graphics_scene(const CGAL_VORONOI_TYPE& v2, +template +void add_to_graphics_scene(const CGAL_VORONOI_TYPE& v2, CGAL::Graphics_scene& graphics_scene) { // Default graphics view options. @@ -355,24 +354,23 @@ void add_in_graphics_scene(const CGAL_VORONOI_TYPE& v2, typename CGAL_VORONOI_TYPE::Face_iterator> gs_options; - add_in_graphics_scene(v2, graphics_scene, gs_options); + add_to_graphics_scene(v2, graphics_scene, gs_options); } #ifdef CGAL_USE_BASIC_VIEWER // Specialization of draw function. -template +template void draw(const CGAL_VORONOI_TYPE& av2, const GSOptions& gs_options, const char *title="2D Voronoi Diagram Basic Viewer") { CGAL::Graphics_scene buffer; - add_in_graphics_scene(av2, buffer, gs_options); + add_to_graphics_scene(av2, buffer, gs_options); draw_graphics_scene(buffer, title); } -template +template void draw(const CGAL_VORONOI_TYPE& av2, const char *title="2D Voronoi Diagram Basic Viewer") { @@ -384,7 +382,7 @@ void draw(const CGAL_VORONOI_TYPE& av2, typename CGAL_VORONOI_TYPE::Face_iterator> gs_options; - add_in_graphics_scene(av2, buffer, gs_options); + add_to_graphics_scene(av2, buffer, gs_options); QApplication_and_basic_viewer app(buffer, title); if(app)