Just added a missing header.
[supertux.git] / src / viewport.h
1 #ifndef __VIEWPORT_H__
2 #define __VIEWPORT_H__
3
4 #include "vector.h"
5
6 class ViewPort
7 {
8 public:
9   ViewPort();
10   ~ViewPort();
11
12   Vector world2screen(const Vector& worldpos) const
13   {
14     return worldpos - translation;
15   }
16     
17   /** returns the current translation (=scroll) vector of the viewport */
18   const Vector& get_translation() const
19   { return translation; }
20
21   void set_translation(const Vector& translation);
22
23 private:
24   Vector translation;
25 };
26
27 #endif
28