From 796ec13391054f04e9be70bb4debd4e7d4108fdc Mon Sep 17 00:00:00 2001 From: Mostafa-ashraf19 Date: Mon, 3 Oct 2022 13:27:22 +0200 Subject: [PATCH] Modified GraphicBuffer class name to snake case. --- GraphicsView/include/CGAL/Graphic_buffer.h | 6 +++--- GraphicsView/include/CGAL/Qt/Basic_viewer_qt.h | 6 +++--- .../demo/Linear_cell_complex/Viewer.h | 2 +- .../CGAL/draw_linear_cell_complex_function.h | 16 ++++++++-------- Point_set_3/include/CGAL/draw_point_set_3.h | 8 ++++---- Polygon/include/CGAL/draw_polygon_2.h | 6 +++--- .../include/CGAL/draw_straight_skeleton_2.h | 18 +++++++++--------- .../include/CGAL/draw_triangulation_2.h | 18 +++++++++--------- .../include/CGAL/draw_triangulation_3.h | 16 ++++++++-------- 9 files changed, 48 insertions(+), 48 deletions(-) diff --git a/GraphicsView/include/CGAL/Graphic_buffer.h b/GraphicsView/include/CGAL/Graphic_buffer.h index 84456815b38..538898df76e 100644 --- a/GraphicsView/include/CGAL/Graphic_buffer.h +++ b/GraphicsView/include/CGAL/Graphic_buffer.h @@ -40,13 +40,13 @@ namespace CGAL { // This class is responsible for dealing with available CGAL data structures and // handling buffers. template -class GraphicBuffer { +class Graphic_buffer { public: typedef CGAL::Exact_predicates_inexact_constructions_kernel Local_kernel; typedef Local_kernel::Point_3 Local_point; - GraphicBuffer(std::vector (&pos)[20], CGAL::Bbox_3 &bbox) + Graphic_buffer(std::vector (&pos)[20], CGAL::Bbox_3 &bbox) : m_buffer_for_mono_points(&pos[POS_MONO_POINTS], nullptr, &bbox, nullptr, nullptr, nullptr), m_buffer_for_colored_points(&pos[POS_COLORED_POINTS], nullptr, &bbox, @@ -72,7 +72,7 @@ public: &pos[FLAT_NORMAL_COLORED_FACES], &pos[SMOOTH_NORMAL_COLORED_FACES]) {} - GraphicBuffer() + Graphic_buffer() : m_buffer_for_mono_points(&arrays[POS_MONO_POINTS], nullptr, &m_bounding_box, nullptr, nullptr, nullptr), m_buffer_for_colored_points(&arrays[POS_COLORED_POINTS], nullptr, diff --git a/GraphicsView/include/CGAL/Qt/Basic_viewer_qt.h b/GraphicsView/include/CGAL/Qt/Basic_viewer_qt.h index 1337df046e1..ceae3cfd1c4 100644 --- a/GraphicsView/include/CGAL/Qt/Basic_viewer_qt.h +++ b/GraphicsView/include/CGAL/Qt/Basic_viewer_qt.h @@ -83,7 +83,7 @@ public: // Constructor/Destructor Basic_viewer_qt(QWidget* parent, - GraphicBuffer& buf, + Graphic_buffer& buf, const char* title="", bool draw_vertices=false, bool draw_edges=true, @@ -1612,7 +1612,7 @@ protected: protected: - GraphicBuffer& gBuffer; + Graphic_buffer& gBuffer; bool m_draw_vertices; bool m_draw_edges; @@ -1724,7 +1724,7 @@ protected: * @param graphic_buffer */ template -void draw_buffer(GraphicBuffer &graphic_buffer) { +void draw_buffer(Graphic_buffer &graphic_buffer) { #if defined(CGAL_TEST_SUITE) bool cgal_test_suite = true; diff --git a/Linear_cell_complex/demo/Linear_cell_complex/Viewer.h b/Linear_cell_complex/demo/Linear_cell_complex/Viewer.h index 9d662e6e6a1..1e314394d60 100644 --- a/Linear_cell_complex/demo/Linear_cell_complex/Viewer.h +++ b/Linear_cell_complex/demo/Linear_cell_complex/Viewer.h @@ -42,7 +42,7 @@ private: Dart_const_handle, Dart_const_handle, Dart_const_handle> m_drawing_functor; - CGAL::GraphicBuffer m_graphic_buffer; + CGAL::Graphic_buffer m_graphic_buffer; Scene* scene; bool m_previous_scene_empty; }; diff --git a/Linear_cell_complex/include/CGAL/draw_linear_cell_complex_function.h b/Linear_cell_complex/include/CGAL/draw_linear_cell_complex_function.h index b97085018de..e8753c5aa4d 100644 --- a/Linear_cell_complex/include/CGAL/draw_linear_cell_complex_function.h +++ b/Linear_cell_complex/include/CGAL/draw_linear_cell_complex_function.h @@ -70,7 +70,7 @@ template void compute_face(typename LCC::Dart_const_handle dh, typename LCC::Dart_const_handle voldh, const LCC *lcc, const DrawingFunctorLCC &m_drawing_functor, - GraphicBuffer &graphic_buffer) + Graphic_buffer &graphic_buffer) { if (!m_drawing_functor.are_faces_enabled() || !m_drawing_functor.draw_face(*lcc, dh)) @@ -115,7 +115,7 @@ void compute_face(typename LCC::Dart_const_handle dh, template void compute_edge(typename LCC::Dart_const_handle dh, const LCC *lcc, const DrawingFunctor &m_drawing_functor, - GraphicBuffer &graphic_buffer) + Graphic_buffer &graphic_buffer) { if (!m_drawing_functor.are_edges_enabled() || !m_drawing_functor.draw_edge(*lcc, dh)) @@ -138,7 +138,7 @@ void compute_edge(typename LCC::Dart_const_handle dh, const LCC *lcc, template void compute_vertex(typename LCC::Dart_const_handle dh, const LCC *lcc, const DrawingFunctorLCC &m_drawing_functor, - GraphicBuffer &graphic_buffer) + Graphic_buffer &graphic_buffer) { if (!m_drawing_functor.are_vertices_enabled() || !m_drawing_functor.draw_vertex(*lcc, dh)) @@ -154,7 +154,7 @@ void compute_vertex(typename LCC::Dart_const_handle dh, const LCC *lcc, } template -void compute_elements(const LCC *lcc, GraphicBuffer &graphic_buffer, +void compute_elements(const LCC *lcc, Graphic_buffer &graphic_buffer, const DrawingFunctor &m_drawing_functor) { if (lcc==nullptr) @@ -245,14 +245,14 @@ void compute_elements(const LCC *lcc, GraphicBuffer &graphic_buffer, * @param alcc */ template -void add_in_graphic_buffer_lcc(const LCC &alcc, GraphicBuffer &graphic_buffer, +void add_in_graphic_buffer_lcc(const LCC &alcc, Graphic_buffer &graphic_buffer, const DrawingFunctor &m_drawing_functor) { draw_function_for_lcc::compute_elements(&alcc, graphic_buffer, m_drawing_functor); } template -void add_in_graphic_buffer_lcc(const LCC &alcc, GraphicBuffer &graphic_buffer) +void add_in_graphic_buffer_lcc(const LCC &alcc, Graphic_buffer &graphic_buffer) { Drawing_functor_with_volume buffer; + Graphic_buffer buffer; add_in_graphic_buffer_lcc(alcc, buffer, drawing_functor); draw_buffer(buffer); } @@ -286,7 +286,7 @@ template void draw(const CGAL_LCC_TYPE &alcc, const char *title = "LCC for CMap Basic Viewer") { - GraphicBuffer buffer; + Graphic_buffer buffer; add_in_graphic_buffer_lcc(alcc, buffer); draw_buffer(buffer); } 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 3c5c5cfb5cc..125ffe73862 100644 --- a/Point_set_3/include/CGAL/draw_point_set_3.h +++ b/Point_set_3/include/CGAL/draw_point_set_3.h @@ -47,7 +47,7 @@ namespace draw_function_for_PointSet { template void compute_vertex(const typename PointSet::Point_map::value_type &p, - GraphicBuffer &graphic_buffer) { + Graphic_buffer &graphic_buffer) { graphic_buffer.add_point(p); // We can use add_point(p, c) with c a CGAL::IO::Color to add a colored point @@ -56,7 +56,7 @@ void compute_vertex(const typename PointSet::Point_map::value_type &p, template void compute_elements(const PointSet *pointset, - GraphicBuffer &graphic_buffer) { + Graphic_buffer &graphic_buffer) { for (typename PointSet::const_iterator it = pointset->begin(); it != pointset->end(); ++it) { compute_vertex(pointset->point(*it), graphic_buffer); @@ -66,7 +66,7 @@ void compute_elements(const PointSet *pointset, } // namespace draw_function_for_PointSet template -void add_in_graphic_buffer_point_set(GraphicBuffer &graphic_buffer, +void add_in_graphic_buffer_point_set(Graphic_buffer &graphic_buffer, const PointSet *aPointSet = nullptr) { if (aPointSet != nullptr) { draw_function_for_PointSet::compute_elements(aPointSet, graphic_buffer); @@ -77,7 +77,7 @@ void add_in_graphic_buffer_point_set(GraphicBuffer &graphic_buffer, template void draw(const Point_set_3 &apointset, const char *title = "Point_set_3 Basic Viewer") { - GraphicBuffer buffer; + Graphic_buffer buffer; add_in_graphic_buffer_point_set(buffer, &apointset); draw_buffer(buffer); } diff --git a/Polygon/include/CGAL/draw_polygon_2.h b/Polygon/include/CGAL/draw_polygon_2.h index 5173a7d5bb1..85c81cdafc9 100644 --- a/Polygon/include/CGAL/draw_polygon_2.h +++ b/Polygon/include/CGAL/draw_polygon_2.h @@ -52,7 +52,7 @@ namespace CGAL { namespace draw_function_for_p2 { template -void compute_elements(CGAL::GraphicBuffer &graphic_buffer, +void compute_elements(CGAL::Graphic_buffer &graphic_buffer, const P2 *p2) { typedef typename P2::Point_2 Point; @@ -79,7 +79,7 @@ void compute_elements(CGAL::GraphicBuffer &graphic_buffer, } // namespace draw_function_for_p2 template -void add_in_graphic_buffer_p2(CGAL::GraphicBuffer &graphic_buffer, +void add_in_graphic_buffer_p2(CGAL::Graphic_buffer &graphic_buffer, const P2 *p2 = nullptr) { if (p2 != nullptr) { draw_function_for_p2::compute_elements(graphic_buffer, p2); @@ -98,7 +98,7 @@ void draw(const CGAL_P2_TYPE &ap2, // typename CGAL_P2_TYPE::Face_const_handle> // drawingFunctor; - CGAL::GraphicBuffer buffer; + CGAL::Graphic_buffer buffer; add_in_graphic_buffer_p2(buffer, &ap2); draw_buffer(buffer); } 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 db4dfaac3ab..6c977a0c4f7 100644 --- a/Straight_skeleton_2/include/CGAL/draw_straight_skeleton_2.h +++ b/Straight_skeleton_2/include/CGAL/draw_straight_skeleton_2.h @@ -32,7 +32,7 @@ namespace draw_function_for_ss2 { template void compute_edge(typename SS2::Halfedge_const_handle eh, const DrawingFunctor &drawing_functor, const SS2 *ss2, - CGAL::GraphicBuffer &graphic_buffer) { + CGAL::Graphic_buffer &graphic_buffer) { if (!drawing_functor.draw_edge(*ss2, eh)) { return; @@ -50,7 +50,7 @@ void compute_edge(typename SS2::Halfedge_const_handle eh, template void print_halfedge_labels(typename SS2::Halfedge_const_handle h, - CGAL::GraphicBuffer &graphic_buffer) { + CGAL::Graphic_buffer &graphic_buffer) { std::stringstream label; label << "H" << h->id() << " (V" << h->vertex()->id() << ") "; @@ -65,7 +65,7 @@ void print_halfedge_labels(typename SS2::Halfedge_const_handle h, template void compute_vertex(typename SS2::Vertex_const_handle vh, const DrawingFunctor &drawing_functor, const SS2 *ss2, - CGAL::GraphicBuffer &graphic_buffer) { + CGAL::Graphic_buffer &graphic_buffer) { if (!drawing_functor.draw_vertex(*ss2, vh)) { return; @@ -84,7 +84,7 @@ void compute_vertex(typename SS2::Vertex_const_handle vh, template void print_vertex_label(typename SS2::Vertex_const_handle vh, - CGAL::GraphicBuffer &graphic_buffer) { + CGAL::Graphic_buffer &graphic_buffer) { std::stringstream label; label << "V" << vh->id() << std::ends; graphic_buffer.add_text(vh->point(), label.str()); @@ -92,7 +92,7 @@ void print_vertex_label(typename SS2::Vertex_const_handle vh, template void compute_elements(const SS2 *ss2, - CGAL::GraphicBuffer &graphic_buffer, + CGAL::Graphic_buffer &graphic_buffer, const DrawingFunctor &drawing_functor) { for (typename SS2::Halfedge_const_iterator it = ss2->halfedges_begin(); @@ -113,7 +113,7 @@ void compute_elements(const SS2 *ss2, template void add_in_graphic_buffer_ss2(const SS2 &ass2, - CGAL::GraphicBuffer &graphic_buffer, + CGAL::Graphic_buffer &graphic_buffer, const DrawingFunctor &drawing_functor) { draw_function_for_ss2::compute_elements(&ass2, graphic_buffer, drawing_functor); @@ -121,7 +121,7 @@ void add_in_graphic_buffer_ss2(const SS2 &ass2, template void add_in_graphic_buffer_ss2( - const SS2 &ass2, CGAL::GraphicBuffer &graphic_buffer) { + const SS2 &ass2, CGAL::Graphic_buffer &graphic_buffer) { Drawing_functor @@ -136,7 +136,7 @@ void add_in_graphic_buffer_ss2( template void draw(const CGAL_SS_TYPE &ass2, const DrawingFunctor &drawingfunctor, const char *title = "Straight Skeleton Basic Viewer") { - CGAL::GraphicBuffer buffer; + CGAL::Graphic_buffer buffer; add_in_graphic_buffer_ss2(ass2, buffer, drawingfunctor); draw_buffer(buffer); } @@ -144,7 +144,7 @@ void draw(const CGAL_SS_TYPE &ass2, const DrawingFunctor &drawingfunctor, template void draw(const CGAL_SS_TYPE &ass2, const char *title = "Straight Skeleton Basic Viewer") { - CGAL::GraphicBuffer buffer; + CGAL::Graphic_buffer buffer; add_in_graphic_buffer_ss2(ass2, buffer); draw_buffer(buffer); } diff --git a/Triangulation_2/include/CGAL/draw_triangulation_2.h b/Triangulation_2/include/CGAL/draw_triangulation_2.h index 271b5b99057..3cb70e32b91 100644 --- a/Triangulation_2/include/CGAL/draw_triangulation_2.h +++ b/Triangulation_2/include/CGAL/draw_triangulation_2.h @@ -31,7 +31,7 @@ namespace draw_function_for_t2 { template void compute_face(typename T2::Finite_faces_iterator fh, const DrawingFunctor &drawing_functor, - CGAL::GraphicBuffer &graphic_buffer, + CGAL::Graphic_buffer &graphic_buffer, const T2 *t2) { if (!drawing_functor.draw_face(*t2, fh)) { @@ -56,7 +56,7 @@ void compute_face(typename T2::Finite_faces_iterator fh, template void compute_edge(typename T2::Finite_edges_iterator eh, const DrawingFunctor &drawing_functor, const T2 *t2, - CGAL::GraphicBuffer &graphic_buffer) { + CGAL::Graphic_buffer &graphic_buffer) { if (!drawing_functor.draw_edge(*t2, eh)) { return; @@ -79,7 +79,7 @@ void compute_edge(typename T2::Finite_edges_iterator eh, template void compute_vertex(typename T2::Vertex_handle vh, - CGAL::GraphicBuffer &graphic_buffer, + CGAL::Graphic_buffer &graphic_buffer, const DrawingFunctor &drawing_functor, const T2 *t2) { if (!drawing_functor.draw_vertex(*t2, vh)) { @@ -96,7 +96,7 @@ void compute_vertex(typename T2::Vertex_handle vh, template void compute_elements(const T2 *t2, - CGAL::GraphicBuffer &graphic_buffer, + CGAL::Graphic_buffer &graphic_buffer, const DrawingFunctor &drawing_functor, bool m_nofaces = false) { @@ -122,7 +122,7 @@ void compute_elements(const T2 *t2, template void add_in_graphic_buffer_t2(const T2 &at2, - CGAL::GraphicBuffer &graphic_buffer, + CGAL::Graphic_buffer &graphic_buffer, const DrawingFunctor &drawing_functor, bool m_nofaces = false) { draw_function_for_t2::compute_elements(&at2, graphic_buffer, drawing_functor, @@ -131,10 +131,10 @@ void add_in_graphic_buffer_t2(const T2 &at2, template void add_in_graphic_buffer_t2(const T2 &at2, - CGAL::GraphicBuffer &graphic_buffer, + CGAL::Graphic_buffer &graphic_buffer, bool m_nofaces = false) { - CGAL::GraphicBuffer buffer; + CGAL::Graphic_buffer buffer; Drawing_functor @@ -162,7 +162,7 @@ template void draw(const CGAL_T2_TYPE &at2, const DrawingFunctor &drawingfunctor, const char *title = "Triangulation_2 Basic Viewer", bool nofill = false) { - CGAL::GraphicBuffer buffer; + CGAL::Graphic_buffer buffer; add_in_graphic_buffer_t2(at2, buffer, drawingfunctor, nofill); draw_buffer(buffer); } @@ -171,7 +171,7 @@ template void draw(const CGAL_T2_TYPE &at2, const char *title = "Triangulation_2 Basic Viewer", bool nofill = false) { - CGAL::GraphicBuffer buffer; + CGAL::Graphic_buffer buffer; add_in_graphic_buffer_t2(at2, buffer, nofill); draw_buffer(buffer); } diff --git a/Triangulation_3/include/CGAL/draw_triangulation_3.h b/Triangulation_3/include/CGAL/draw_triangulation_3.h index 42697e9938e..a965fb878fa 100644 --- a/Triangulation_3/include/CGAL/draw_triangulation_3.h +++ b/Triangulation_3/include/CGAL/draw_triangulation_3.h @@ -32,7 +32,7 @@ namespace draw_function_for_t3 template void compute_face(typename T3::Finite_facets_iterator fh, const DrawingFunctor &drawing_functor, - CGAL::GraphicBuffer &graphic_buffer, const T3 *t3) + CGAL::Graphic_buffer &graphic_buffer, const T3 *t3) { if(!drawing_functor.draw_face(*t3, fh)) { return; } @@ -57,7 +57,7 @@ void compute_face(typename T3::Finite_facets_iterator fh, template void compute_edge(typename T3::Finite_edges_iterator eh, - CGAL::GraphicBuffer &graphic_buffer, + CGAL::Graphic_buffer &graphic_buffer, const DrawingFunctor &drawing_functor, const T3 *t3) { if(!drawing_functor.draw_edge(*t3, eh)) @@ -77,7 +77,7 @@ void compute_edge(typename T3::Finite_edges_iterator eh, template void compute_vertex(typename T3::Vertex_handle vh, - CGAL::GraphicBuffer &graphic_buffer, + CGAL::Graphic_buffer &graphic_buffer, const DrawingFunctor &drawing_functor, const T3 *t3) { if(!drawing_functor.draw_vertex(*t3, vh)) @@ -93,7 +93,7 @@ void compute_vertex(typename T3::Vertex_handle vh, } template -void compute_elements(const T3 *t3, CGAL::GraphicBuffer &graphic_buffer, +void compute_elements(const T3 *t3, CGAL::Graphic_buffer &graphic_buffer, const DrawingFunctor &drawing_functor) { for (typename T3::Finite_facets_iterator it = t3->finite_facets_begin(); @@ -119,7 +119,7 @@ void compute_elements(const T3 *t3, CGAL::GraphicBuffer &graphic_buf template void add_in_graphic_buffer_t3(const T3 &at3, - CGAL::GraphicBuffer &graphic_buffer, + CGAL::Graphic_buffer &graphic_buffer, const DrawingFunctor &drawing_functor) { draw_function_for_t3::compute_elements(&at3, graphic_buffer, drawing_functor); @@ -127,7 +127,7 @@ void add_in_graphic_buffer_t3(const T3 &at3, template void add_in_graphic_buffer_t3(const T3 &at3, - CGAL::GraphicBuffer &graphic_buffer) + CGAL::Graphic_buffer &graphic_buffer) { CGAL::Drawing_functor void draw(const CGAL_T3_TYPE &at3, const DrawingFunctor &drawingfunctor, const char *title = "T3 Basic Viewer") { - CGAL::GraphicBuffer buffer; + CGAL::Graphic_buffer buffer; add_in_graphic_buffer_t3(at3, buffer, drawingfunctor); draw_buffer(buffer); } @@ -171,7 +171,7 @@ void draw(const CGAL_T3_TYPE &at3, const DrawingFunctor &drawingfunctor, template void draw(const CGAL_T3_TYPE &at3, const char *title = "T3 Basic Viewer") { - CGAL::GraphicBuffer buffer; + CGAL::Graphic_buffer buffer; add_in_graphic_buffer_t3(at3, buffer); draw_buffer(buffer); }