-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCamera.h
More file actions
42 lines (29 loc) · 886 Bytes
/
Camera.h
File metadata and controls
42 lines (29 loc) · 886 Bytes
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
#ifndef _CAMERA_H
#define _CAMERA_H
// class based on www.gametutorials.com - see license.txt
#include "CVector3.h"
#include "Engine.h"
#include <iostream>
using namespace std;
class Camera {
public:
Camera();
~Camera();
finline CVector3 getPosition() { return position; }
finline CVector3 getView() { return view; }
finline CVector3 getUpVector() { return upVector; }
CVector3 getDirectionNormalized();
void rotateView(float angle, float X, float Y, float Z);
void applyKeyboardMovements();
void strafeCamera(float speed);
void moveCamera(float speed);
void update();
private:
void init();
CVector3 position;
CVector3 view;
CVector3 upVector;
CVector3 strafe;
void setViewMatrixCamera();
};
#endif