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