-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVisualizer.h
98 lines (83 loc) · 2.16 KB
/
Visualizer.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
#ifndef GLWIDGET_H
#define GLWIDGET_H
#include <QGLWidget>
#include <QString>
#include <QTime>
typedef QVector<float> FloatVector;
class Model;
class Visualizer : public QGLWidget
{
Q_OBJECT
public:
Visualizer(QWidget *parent = 0);
~Visualizer();
void setModel(Model* m);
Model* getModel();
QSize minimumSizeHint() const;
QSize sizeHint() const;
void saveGLState();
void restoreGLState();
void paintGLOld();
void paintGL();
void drawRectangularPrism(float, float, float, float, float, float);
float getDisplayRadius();
public slots:
void setXRotation(int angle);
void setYRotation(int angle);
void setZRotation(int angle);
void ZoomIn();
void ZoomOut();
void stop();
void start();
void displayParseError(QString msg);
void PanUp();
void PanDown();
void PanLeft();
void PanRight();
void GUISetTargetDisplayRadius(const QString &);
void GUISetTargetDetectRadius(const QString &);
void GUISetClusterRadius(const QString &);
void GUIgenerate();
void GUIPlaceSearchers();
//void updateGL();
signals:
void xRotationChanged(int angle);
void yRotationChanged(int angle);
void zRotationChanged(int angle);
void StartModel();
void StopModel();
void generate();
void clearPaths();
void VisPlaceSearchers();
void VisFinishedPaintGL();
void VisSetSearchType(int v);
void VisSetClusterRadius(FloatVector v);
protected:
void initializeGL();
void resizeGL(int width, int height);
void mousePressEvent(QMouseEvent *event);
void mouseMoveEvent(QMouseEvent *event);
void wheelEvent(QWheelEvent *);
private:
int xRot;
int yRot;
int zRot;
QPoint lastPos;
QColor qtGreen;
QColor qtPurple;
Model* model;
float scale;
float x_min_bound;
float y_min_bound;
float z_min_bound;
float x_max_bound;
float y_max_bound;
float z_max_bound;
float horz_pan;
float vert_pan;
float target_display_radius;
float target_detect_radius;
QTime time;
int frames;
};
#endif