From e97d45d07dc003af8fa7344e3ab8d63203122a3c Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Fri, 18 May 2018 10:15:00 +0200 Subject: [PATCH] Update Classification Plugin --- .../Classification/Classification_plugin.cpp | 27 ++++++------------- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/Polyhedron/demo/Polyhedron/Plugins/Classification/Classification_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Classification/Classification_plugin.cpp index b8cbbf41262..5dc092979e5 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Classification/Classification_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Classification/Classification_plugin.cpp @@ -1,8 +1,8 @@ #include #include #include -#include -#include +#include +#include #include #include "opengl_tools.h" @@ -1018,29 +1018,18 @@ public Q_SLOTS: classif->select_random_region(); item_changed(classif->item()); - QGLViewer* viewer = *QGLViewer::QGLViewerPool().begin(); + CGAL::QGLViewer* viewer = *CGAL::QGLViewer::QGLViewerPool().begin(); CGAL::Bbox_3 bbox = classif->bbox(); - const qglviewer::Vec offset = static_cast(viewer)->offset(); + const CGAL::qglviewer::Vec offset = static_cast(viewer)->offset(); - viewer->camera()->fitBoundingBox(qglviewer::Vec (bbox.xmin(), bbox.ymin(), bbox.zmin()) + offset, - qglviewer::Vec (bbox.xmax(), bbox.ymax(), bbox.zmax()) + offset); + viewer->camera()->fitBoundingBox(CGAL::qglviewer::Vec (bbox.xmin(), bbox.ymin(), bbox.zmin()) + offset, + CGAL::qglviewer::Vec (bbox.xmax(), bbox.ymax(), bbox.zmax()) + offset); - // viewer->camera()->showEntireScene(); - - // bbox = scene->bbox(); - // viewer->setSceneBoundingBox(qglviewer::Vec (bbox.xmin(), bbox.ymin(), bbox.zmin()), - // qglviewer::Vec (bbox.xmax(), bbox.ymax(), bbox.zmax())); -#if QGLVIEWER_VERSION >= 0x020502 - viewer->camera()->setPivotPoint (qglviewer::Vec ((bbox.xmin() + bbox.xmax()) / 2., + + viewer->camera()->setPivotPoint (CGAL::qglviewer::Vec ((bbox.xmin() + bbox.xmax()) / 2., (bbox.ymin() + bbox.ymax()) / 2., (bbox.zmin() + bbox.zmax()) / 2.) + offset); -#else - viewer->camera()->setRevolveAroundPoint (qglviewer::Vec ((bbox.xmin() + bbox.xmax()) / 2., - (bbox.ymin() + bbox.ymax()) / 2., - (bbox.zmin() + bbox.zmax()) / 2.) + offset); -#endif - } void on_train_clicked()