-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgraph.h
58 lines (47 loc) · 1.08 KB
/
graph.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 GRAPH_H
#define GRAPH_H
#endif // GRAPH_H
#include <iostream>
#include <vector>
#include <math.h>
#include <QApplication>
#include <QDesktopWidget>
#include <QGLWidget>
#include <QKeyEvent>
#include <QMouseEvent>
#include <QMessageBox>
#include <GL/gl.h>
#include <GL/glu.h>
#include <Box2D/Box2D.h>
#include "genlab.h"
#include "ball.h"
#include "wall.h"
#define TX_WALL 0
#define TX_GROUND 1
#define TX_FINISH 2
#define TX_WAY 3
#define GL_CLAMP_TO_EDGE 0x812F
class graphics: public QGLWidget, public labirint{
private:
ball b;
point view;
int mH, mW;
float angleX, angleY;
unsigned char mapmode;
GLuint textureID[32];
void __draw(unsigned _x, unsigned _y);
void __graphics();
protected:
void initializeGL();
void resizeGL(int width, int height);
void paintGL();
void keyPressEvent(QKeyEvent *event);
void keyReleaseEvent(QKeyEvent *event);
void mouseMoveEvent(QMouseEvent *event);
void timerEvent(QTimerEvent *);
public:
void collisions();
void genTextures();
graphics(int width, int height);
graphics();
};