forked from Ramblurr/scriptbots
-
Notifications
You must be signed in to change notification settings - Fork 44
/
GLView.h
63 lines (46 loc) · 1.22 KB
/
GLView.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
#ifndef GLVIEW_H
#define GLVIEW_H
#include "View.h"
#include "World.h"
class GLView;
extern GLView* GLVIEW;
void gl_processNormalKeys(unsigned char key, int x, int y);
void gl_processMouse(int button, int state, int x, int y);
void gl_processMouseActiveMotion(int x, int y);
void gl_changeSize(int w, int h);
void gl_handleIdle();
void gl_renderScene();
class GLView : public View
{
public:
GLView(World* w);
virtual ~GLView();
virtual void drawAgent(const Agent &a);
virtual void drawFood(int x, int y, float quantity);
virtual void drawMisc();
void setWorld(World* w);
//GLUT functions
void processNormalKeys(unsigned char key, int x, int y);
void processMouse(int button, int state, int x, int y);
void processMouseActiveMotion(int x, int y);
void changeSize(int w, int h);
void handleIdle();
void renderScene();
private:
World *world;
bool paused;
bool draw;
int skipdraw;
bool drawfood;
char buf[100];
char buf2[10];
int modcounter;
int lastUpdate;
int frames;
float scalemult;
float xtranslate, ytranslate;
int downb[3];
int mousex, mousey;
int following;
};
#endif // GLVIEW_H