-
Notifications
You must be signed in to change notification settings - Fork 1
/
glwidget.h
58 lines (43 loc) · 1.05 KB
/
glwidget.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
#ifndef GLWIDGET_H
#define GLWIDGET_H
#define WHEEL_COEF = 100;
#include <QGLWidget>
#include <QMouseEvent>
#include <QWheelEvent>
#include <QPoint>
#include <QDebug>
#include <QKeyEvent>
#include <vector>
#include <cmath>
#include "transformationLibrary.h"
#include "objeto.h"
using namespace std;
class GLWidget : public QGLWidget
{
Q_OBJECT
public:
explicit GLWidget(QGLWidget *parent = 0);
vector<Objeto> objetos;
int width,height;
Vertice centro;
void paintGL();
void resizeGL(int w, int h);
void initializeGL();
void mousePressEvent(QMouseEvent *event);
void mouseMoveEvent(QMouseEvent *event);
void mouseReleaseEvent(QMouseEvent *event);
void wheelEvent(QWheelEvent *event);
void keyPressEvent(QKeyEvent *event);
void drawModel();
void refresh();
void calcular_centro();
float grab = 0;
float move[2];
bool ortho = false;
bool left_pressed = false;
bool right_pressed = false;
bool mid_pressed = false;
signals:
public slots:
};
#endif // GLWIDGET_H