-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcamera.h
67 lines (47 loc) · 1.44 KB
/
camera.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
64
65
66
67
class Camera
{
private:
// a vector pointing in the direction you're facing
float forwardVec[3];
// a vector pointing to the right of where your facing (to describe orientation
float rightVec[3];
// a vector pointing upwards from where youre facing
float upVec[3];
// a vector describing the position of the camera
float position[3];
// the camera speed
float cameraSpeed;
float cameraTurnSpeed;
public:
Camera(void);
// transform the opengl view matrix for the orientation
void transformOrientation(void);
// transform the opoengl view matrix for the translation
void transformTranslation(void);
// points the camera at the given point in 3d space
void pointAt(float* targetVec);
// speed up the camera speed
void speedUp(void);
// slow down the camera speed
void slowDown(void);
// move the camera forward
void forward(void);
// strafe left
void left(void);
// strafe right
void right(void);
// move the camera backward
void backward(void);
// roll the camera to the right
void rollRight(void);
// roll the camera to the left
void rollLeft(void);
// pitch the camera up
void pitchUp(void);
// pitch the camera down
void pitchDown(void);
// yaw left
void yawLeft(void);
// yaw right
void yawRight(void);
};