]> git.localhorst.tv Git - l2e.git/blob - src/graphics/Camera.h
fix blocking flag of guy
[l2e.git] / src / graphics / Camera.h
1 /*
2  * Camera.h
3  *
4  *  Created on: Sep 29, 2012
5  *      Author: holy
6  */
7
8 #ifndef GRAPHICS_CAMERA_H_
9 #define GRAPHICS_CAMERA_H_
10
11 #include "../geometry/Vector.h"
12
13 namespace graphics {
14
15 class Camera {
16
17 public:
18         Camera(int width, int height, const geometry::Vector<float> *target);
19         ~Camera() { }
20
21 public:
22         void Resize(int w, int h) { halfWidth = w / 2; halfHeight = h / 2; }
23         void SetTarget(const geometry::Vector<float> *t);
24
25         geometry::Vector<int> CalculateOffset() const;
26
27 private:
28         const geometry::Vector<float> *target;
29         int halfWidth;
30         int halfHeight;
31
32 };
33
34 }
35
36 #endif /* GRAPHICS_CAMERA_H_ */