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