-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathController.h
More file actions
66 lines (53 loc) · 1.52 KB
/
Controller.h
File metadata and controls
66 lines (53 loc) · 1.52 KB
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
/*
* Controller.h
* 3d Ink
*
* Created by David Roberts on 26/07/2009.
* Durham University
*
*/
#include <GLUT/glut.h>
#include <GL/glfw.h>
#include <cmath>
#include "Model.h"
#include "Settings.h"
#include "UtilityClasses.h"
using namespace std;
#if !defined(CONTROLLER_H)
#define CONTROLLER_H
class Controller {
private:
static bool pressed, scrollDown, scrollUp;
static int xTablet, yTablet;
static Model* modelPointer;
public:
static int noTabletButtons;
static int xMouse, yMouse;
static GLfloat z;
//if true, pen, else eraser
static bool penType;
static GLfloat pointSize;
static bool shape;
static Shape shapeType;
static Point startRect;
static Point endRect;
Controller();
~Controller();
/* Handles mouse button events */
static void processMouseButton(int button, int state, int x, int y);
/* Handles movement of a mouse when a button is clicked */
static void processMouseActiveMotion(int x, int y);
/* Handles movement of a mouse when no button is clicked */
static void processMousePassiveMotion(int x, int y);
/* Handles standard keyboard events */
static void handleKeyboard(unsigned char key, int xpos, int ypos);
/* Handles special keyboard events */
static void handleSpecialKeys(int key, int x, int y);
/* Handles tablet button events */
static void processTabletButton(int button, int state, int x, int y);
/* Handles tablet movement */
static void processTabletMotion(int x, int y);
/* Handles scaling of coordinates */
static Point scaleCoords(int x, int y);
};
#endif