forked from francisengelmann/FabScan100
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmainwidget.h
62 lines (49 loc) · 1.18 KB
/
mainwidget.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
#ifndef MAINWIDGET_H
#define MAINWIDGET_H
#include "staticHeaders.h"
QT_BEGIN_NAMESPACE
class QBasicTimer;
class QGLShaderProgram;
QT_END_NAMESPACE
class GeometryEngine;
class MainWidget : public QGLWidget, protected QGLFunctions
{
Q_OBJECT
public:
explicit MainWidget(QWidget *parent = 0);
virtual ~MainWidget();
char drawState;
void paintGL();
signals:
public slots:
protected:
void wheelEvent(QWheelEvent *e);
void mousePressEvent(QMouseEvent *e);
void mouseMoveEvent(QMouseEvent *e);
void mouseReleaseEvent(QMouseEvent *e);
void timerEvent(QTimerEvent *e);
void initializeGL();
void resizeGL(int w, int h);
void initShaders();
void initTextures();
private:
QBasicTimer *timer;
QGLShaderProgram *program;
GeometryEngine *geometries;
GLuint texture;
//Transformation matrices for the camera
QMatrix4x4 projection;
QVector3D eye;
QVector3D center;
QVector3D up;
double angleX;
double angleY;
double angleXtmp;
double angleYtmp;
double distance;
QVector2D mousePressPosition;
QVector3D rotationAxis;
qreal angularSpeed;
QQuaternion rotation;
};
#endif // MAINWIDGET_H