]> git.localhorst.tv Git - l2e.git/blob - src/graphics/Camera.h
new language, new compiler
[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         const math::Vector<math::Fixed<8> > *GetTarget() const { return target; }
19
20         math::Vector<int> CalculateOffset() const;
21
22 private:
23         const math::Vector<math::Fixed<8> > *target;
24         int halfWidth;
25         int halfHeight;
26
27 };
28
29 }
30
31 #endif