11 #ifndef VIEW_VIEWER_H_
12 #define VIEW_VIEWER_H_
14 #include <QGLViewer/qglviewer.h>
18 #include "View_parameter.h"
19 #include "model/Complex_typedefs.h"
21 #include "Viewer_instructor.h"
23 class Viewer_instructor;
25 class Viewer :
public QGLViewer {
28 Viewer_instructor * instructor;
34 typedef Complex::GT Gudhi_kernel;
35 typedef Gudhi_kernel::Point_3 Point_3;
38 Viewer(QWidget* parent);
40 void set_instructor(Viewer_instructor* instructor_);
42 void show_entire_scene();
46 void set_bounding_box(
const Point_3 & lower_left,
const Point_3 & upper_right);
56 void set_light_direction(
double theta,
double phi);
61 void set_light_direction();
64 virtual void postSelection(
const QPoint& point);
70 void set_size_point(
double size_points);
72 void set_color(
const Color& color);
74 void draw_point(
const Point_3& p,
const Color& color,
double size_points);
76 void begin_draw_points(
double size,
bool light =
false);
78 void draw_points(
const Point_3 & point);
80 void end_draw_points();
82 void draw_edge(
const Point_3 &a,
const Point_3 &b,
const Color& color,
double size);
84 void begin_draw_edges(
double size,
bool light =
false);
86 void draw_edges(
const Point_3 &a,
const Point_3 &b);
88 void end_draw_edges();
90 void begin_draw_triangles(
double size,
bool light,
bool transparent =
false);
92 void draw_triangles(
const Point_3& p1,
const Point_3& p2,
const Point_3& p3);
95 void draw_triangles(
const std::vector<Point_3*>& points);
97 void end_draw_triangles();
101 void click(
const Point_3& position);