From bb117e9792f1cd0ee1f1707472d45cdf747bdfd8 Mon Sep 17 00:00:00 2001 From: Guillaume Damiand Date: Wed, 13 Nov 2019 11:51:54 +0100 Subject: [PATCH] Bug fix --- GraphicsView/include/CGAL/Buffer_for_vao.h | 6 ++++-- GraphicsView/include/CGAL/Qt/Basic_viewer_qt.h | 18 ++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/GraphicsView/include/CGAL/Buffer_for_vao.h b/GraphicsView/include/CGAL/Buffer_for_vao.h index 9d6f707ea48..4d4f48a68e1 100644 --- a/GraphicsView/include/CGAL/Buffer_for_vao.h +++ b/GraphicsView/include/CGAL/Buffer_for_vao.h @@ -98,7 +98,7 @@ namespace internal CGAL::Cartesian_converter converter; return converter(v); } - static Local_ray get_local_ray(const typename K::Ray_2& r) + static typename Local_kernel::Ray_2 get_local_ray(const typename K::Ray_2& r) { CGAL::Cartesian_converter converter; return converter(r); @@ -121,6 +121,8 @@ namespace internal { return typename Local_kernel::Vector_3(v.x(), 0, v.y()); } static const typename Local_kernel::Vector_3& get_local_vector(const typename Local_kernel::Vector_3& v) { return v; } + static const typename Local_kernel::Ray_2& get_local_ray(const typename Local_kernel::Ray_2& r) + { return r; } }; } // End namespace internal @@ -223,7 +225,7 @@ public: { if (!has_position()) return (std::size_t)-1; - Local_point p=internal::get_local_point(kp); + Local_point p=get_local_point(kp); add_point_in_buffer(p, *m_pos_buffer); return m_pos_buffer->size()-3; } diff --git a/GraphicsView/include/CGAL/Qt/Basic_viewer_qt.h b/GraphicsView/include/CGAL/Qt/Basic_viewer_qt.h index 97150bce320..87762ba030b 100644 --- a/GraphicsView/include/CGAL/Qt/Basic_viewer_qt.h +++ b/GraphicsView/include/CGAL/Qt/Basic_viewer_qt.h @@ -429,23 +429,21 @@ public: { m_buffer_for_colored_segments.add_segment(p1, p2, acolor); } template - void update_bounding_box_for_ray(const KPoint &p, const KVector &v) { - // m_buffer_for_mono_points.add_point(p); - Local_point lp = internal::get_local_point(p); - Local_vector lv = internal::get_local_vector(v); + void update_bounding_box_for_ray(const KPoint &p, const KVector &v) + { + Local_point lp = get_local_point(p); + Local_vector lv = get_local_vector(v); CGAL::Bbox_3 b = (lp + lv).bbox(); m_bounding_box += b; - // m_bounding_box += CGAL::Bbox_3(b.xmin(), 0, b.ymin(), b.xmax(), 0, - // b.ymax()); } template void update_bounding_box_for_line(const KPoint &p, const KVector &v, const KVector &pv) { - Local_point lp = internal::get_local_point(p); - Local_vector lv = internal::get_local_vector(v); - Local_vector lpv = internal::get_local_vector(pv); + Local_point lp = get_local_point(p); + Local_vector lv = get_local_vector(v); + Local_vector lpv = get_local_vector(pv); CGAL::Bbox_3 b = lp.bbox() + (lp + lv).bbox() + (lp + lpv).bbox(); m_bounding_box += b; @@ -484,7 +482,7 @@ public: template void add_text(const KPoint& kp, const QString& txt) { - Local_point p=internal::get_local_point(kp); + Local_point p=get_local_point(kp); m_texts.push_back(std::make_tuple(p, txt)); }