From eea01ce5fed7613c88df23ee81b027efbd940f36 Mon Sep 17 00:00:00 2001 From: Guillaume Damiand Date: Wed, 18 Oct 2023 16:23:09 +0200 Subject: [PATCH] Replace some flot by BufferType --- Basic_viewer/include/CGAL/Buffer_for_vao.h | 24 +++++++++++----------- Basic_viewer/include/CGAL/Graphics_scene.h | 4 ++-- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Basic_viewer/include/CGAL/Buffer_for_vao.h b/Basic_viewer/include/CGAL/Buffer_for_vao.h index 438b1515354..c161c009d4e 100644 --- a/Basic_viewer/include/CGAL/Buffer_for_vao.h +++ b/Basic_viewer/include/CGAL/Buffer_for_vao.h @@ -459,31 +459,31 @@ public: /// adds `kp` coordinates to `buffer` template - static void add_point_in_buffer(const KPoint& kp, std::vector& buffer) + static void add_point_in_buffer(const KPoint& kp, std::vector& buffer) { Local_point p=get_local_point(kp); - buffer.push_back(static_cast(p.x())); - buffer.push_back(static_cast(p.y())); - buffer.push_back(static_cast(p.z())); + buffer.push_back(static_cast(p.x())); + buffer.push_back(static_cast(p.y())); + buffer.push_back(static_cast(p.z())); } /// adds `kv` coordinates to `buffer` template - static void add_normal_in_buffer(const KVector& kv, std::vector& buffer, + static void add_normal_in_buffer(const KVector& kv, std::vector& buffer, bool inverse_normal=false) { Local_vector n=(inverse_normal?-get_local_vector(kv):get_local_vector(kv)); - buffer.push_back(static_cast(n.x())); - buffer.push_back(static_cast(n.y())); - buffer.push_back(static_cast(n.z())); + buffer.push_back(static_cast(n.x())); + buffer.push_back(static_cast(n.y())); + buffer.push_back(static_cast(n.z())); } ///adds `acolor` RGB components to `buffer` - static void add_color_in_buffer(const CGAL::IO::Color& acolor, std::vector& buffer) + static void add_color_in_buffer(const CGAL::IO::Color& acolor, std::vector& buffer) { - buffer.push_back((float)acolor.red()/(float)255); - buffer.push_back((float)acolor.green()/(float)255); - buffer.push_back((float)acolor.blue()/(float)255); + buffer.push_back((BufferType)acolor.red()/(BufferType)255); + buffer.push_back((BufferType)acolor.green()/(BufferType)255); + buffer.push_back((BufferType)acolor.blue()/(BufferType)255); } /// @return true iff the points of 'facet' form a convex face diff --git a/Basic_viewer/include/CGAL/Graphics_scene.h b/Basic_viewer/include/CGAL/Graphics_scene.h index fd5fcc4cde1..ed5a256daa3 100644 --- a/Basic_viewer/include/CGAL/Graphics_scene.h +++ b/Basic_viewer/include/CGAL/Graphics_scene.h @@ -128,7 +128,7 @@ public: const CGAL::Bbox_3 &get_bounding_box() const { return m_bounding_box; } - std::vector &get_array_of_index(int index) { return arrays[index]; } + std::vector &get_array_of_index(int index) { return arrays[index]; } int get_size_of_index(int index) const { return static_cast(arrays[index].size()*sizeof(BufferType)); } @@ -410,7 +410,7 @@ protected: std::vector> m_texts; - std::vector arrays[LAST_INDEX]; + std::vector arrays[LAST_INDEX]; CGAL::Bbox_3 m_bounding_box; };