YAPOG  0.0.1
Yet Another Pokemon Online Game
CameraController.hpp
Go to the documentation of this file.
1 #ifndef YAPOG_CAMERACONTROLLER_HPP
2 # define YAPOG_CAMERACONTROLLER_HPP
3 
4 # include "YAPOG/Macros.hpp"
7 
8 namespace yap
9 {
10  struct ICamera;
11  struct ISpatial;
12 
14  {
16 
17  public:
18 
19  virtual ~CameraController ();
20 
21  void SetTarget (ISpatial& target);
22 
24  void FocusTarget ();
25 
26  void SetBounds (const FloatRect& bounds);
27 
30  virtual void Update (const Time& dt);
32 
33  protected:
34 
35  explicit CameraController (ICamera& camera);
36 
37  void CheckBounds (Vector2& offset);
38 
39  void CenterOnTarget ();
40 
41  virtual void HandleFocusTarget () = 0;
42 
43  virtual void HandleUpdate (const Time& dt) = 0;
44 
47 
49  };
50 } // namespace yap
51 
52 #endif // YAPOG_CAMERACONTROLLER_HPP