-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathdialog.h
67 lines (47 loc) · 1.12 KB
/
dialog.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
#ifndef DIALOG_H
#define DIALOG_H
#include <QDialog>
#include <QTimer>
#include <QOpenGLWidget>
#include <QMatrix4x4>
#include <QOpenGLShaderProgram>
#include <QOpenGLVertexArrayObject>
#include <QOpenGLBuffer>
#include <QOpenGLTexture>
#include "texturedsphere.h"
class EventHandler;
namespace Ui {
class Dialog;
}
class Dialog : public QOpenGLWidget
{
Q_OBJECT
public:
explicit Dialog(QWidget *parent = 0);
virtual ~Dialog();
private slots:
void nextFrame();
private:
//handle key presses
bool event(QEvent *event);
void initializeGL();
void paintGL();
private:
Ui::Dialog* ui;
QTimer* m_timer; //Timer object for triggering updates
QMatrix4x4 m_view;
QMatrix4x4 m_proj;
QMatrix4x4 m_model;
QOpenGLShaderProgram m_program;
QOpenGLVertexArrayObject m_vao;
QOpenGLBuffer m_cubeVertices;
QOpenGLBuffer m_cubeIndices;
TexturedSphere m_sphere;
QOpenGLTexture* m_texture;
QVector3D m_cameraVelocity;
std::unique_ptr<EventHandler> m_eventHandler;
class KeyEventHandler;
class KeyEventPan;
class MouseWheelEventZoom;
};
#endif // DIALOG_H