summaryrefslogtreecommitdiff
path: root/src/GudhUI/view/Viewer_instructor.h
diff options
context:
space:
mode:
authorvrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2015-10-08 21:15:51 +0000
committervrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2015-10-08 21:15:51 +0000
commitcd2e83819689afd2cd1bc76810282111cf5cd59d (patch)
tree8cf97b1f5a8589fa160d03248ca3f429b436b814 /src/GudhUI/view/Viewer_instructor.h
parent58e633f51ffa06aa219231cd1c08eab59457a12f (diff)
cpplint fixes on GudhUI
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/trunk@844 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 3acf1e789f3e4bded974f324ce3161bc1d1d2433
Diffstat (limited to 'src/GudhUI/view/Viewer_instructor.h')
-rw-r--r--src/GudhUI/view/Viewer_instructor.h149
1 files changed, 78 insertions, 71 deletions
diff --git a/src/GudhUI/view/Viewer_instructor.h b/src/GudhUI/view/Viewer_instructor.h
index 62b3755e..e1c6af8b 100644
--- a/src/GudhUI/view/Viewer_instructor.h
+++ b/src/GudhUI/view/Viewer_instructor.h
@@ -1,17 +1,40 @@
-#ifndef VIEWER_INSTRUCTOR_H
-#define VIEWER_INSTRUCTOR_H
+/* This file is part of the Gudhi Library. The Gudhi library
+ * (Geometric Understanding in Higher Dimensions) is a generic C++
+ * library for computational topology.
+ *
+ * Author(s): David Salinas
+ *
+ * Copyright (C) 2014 INRIA Sophia Antipolis-Mediterranee (France)
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef VIEW_VIEWER_INSTRUCTOR_H
+#define VIEW_VIEWER_INSTRUCTOR_H
// todo do a viewer instructor that have directely a pointer to a QGLviewer and buffer ot not triangles
// Workaround for moc-qt4 not parsing boost headers
#include <CGAL/config.h>
-#include <memory>
-
#include <QFileDialog>
#include <QKeyEvent>
#include <QGLViewer/camera.h>
+#include <memory>
+#include <utility> // for pair<>
#include "model/Complex_typedefs.h"
@@ -22,89 +45,73 @@
class Viewer;
class Viewer_parameter;
-class Viewer_instructor : public QWidget{
- Q_OBJECT
-
- typedef Geometry_trait::Point_3 Point_3;
- typedef Complex::Point Point;
- typedef Complex::Vertex_handle Vertex_handle;
- typedef Complex::Edge_handle Edge_handle;
- typedef Complex::Simplex_handle Simplex_handle;
-
-
- Viewer* viewer_;
- View_parameter view_params_;
- const Complex& mesh_;
- std::unique_ptr<Projector3D> projector_;
-
-
-public:
-
- Viewer_instructor(QWidget* parent,
- Viewer* viewer,
- const Complex& mesh
- );
-
-
- void initialize_bounding_box();
-
- std::pair<Point,Point> compute_bounding_box_corners();
-
- void show_entire_scene();
-
- const qglviewer::Camera* camera() const;
-
- int width() const;
- int height() const;
-
- /**
- * to change display parameters
- */
- View_parameter& view_params();
+class Viewer_instructor : public QWidget {
+ Q_OBJECT
+ typedef Geometry_trait::Point_3 Point_3;
+ typedef Complex::Point Point;
+ typedef Complex::Vertex_handle Vertex_handle;
+ typedef Complex::Edge_handle Edge_handle;
+ typedef Complex::Simplex_handle Simplex_handle;
-public:
+ Viewer* viewer_;
+ View_parameter view_params_;
+ const Complex& mesh_;
+ std::unique_ptr<Projector3D> projector_;
- /**
- * gives instructions to the viewer
- */
- void give_instructions();
+ public:
+ Viewer_instructor(QWidget* parent, Viewer* viewer, const Complex& mesh);
- void draw_edges();
- void draw_triangles();
- void draw_points();
+ void initialize_bounding_box();
+ std::pair<Point, Point> compute_bounding_box_corners();
- void draw_edge(const Point&,const Point&);
+ void show_entire_scene();
- void draw_point(const Point&);
+ const qglviewer::Camera* camera() const;
+ int width() const;
+ int height() const;
- /**
- * set the right color of vertex/edge/triangle considering the view_params choice
- */
- void set_color_vertex(Vertex_handle vh);
- void set_color_edge(Edge_handle eh);
+ /**
+ * to change display parameters
+ */
+ View_parameter& view_params();
- void set_color_triangle(const Simplex_handle& triangle);
+ public:
+ /**
+ * gives instructions to the viewer
+ */
+ void give_instructions();
-private:
- /**
- * Projection to 3D needed for the viewer.
- */
- Point_3 proj(const Point& p) const;
+ void draw_edges();
+ void draw_triangles();
+ void draw_points();
- public slots :
+ void draw_edge(const Point&, const Point&);
- void sceneChanged();
+ void draw_point(const Point&);
- void change_draw_vertices();
- void change_draw_edges();
- void change_draw_triangles();
- void change_light();
+ /**
+ * set the right color of vertex/edge/triangle considering the view_params choice
+ */
+ void set_color_vertex(Vertex_handle vh);
+ void set_color_edge(Edge_handle eh);
+ void set_color_triangle(const Simplex_handle& triangle);
+ private:
+ /**
+ * Projection to 3D needed for the viewer.
+ */
+ Point_3 proj(const Point& p) const;
+ public slots:
+ void sceneChanged();
+ void change_draw_vertices();
+ void change_draw_edges();
+ void change_draw_triangles();
+ void change_light();
};
-#endif //VIEWER_INSTRUCTOR_H
+#endif // VIEW_VIEWER_INSTRUCTOR_H