YAPOG  0.0.1
Yet Another Pokemon Online Game
ICamera.hpp
Go to the documentation of this file.
1 #ifndef YAPOG_ICAMERA_HPP
2 # define YAPOG_ICAMERA_HPP
3 
4 # include <SFML/Graphics/View.hpp>
5 # include <SFML/Graphics/Rect.hpp>
6 
7 # include "YAPOG/Macros.hpp"
11 
12 namespace yap
13 {
15  struct ICamera : public ISpatial
16  {
17  virtual ~ICamera () {}
18 
19  virtual bool IsInView (const Vector2& point) const = 0;
20  virtual bool IsInView (const Vector2& point,
21  const Vector2& size) const = 0;
22 
23  virtual Vector2 ToLocal (const Vector2& globalPoint) const = 0;
24  virtual Vector2 ToGlobal (const Vector2& localPoint) const = 0;
25 
26  virtual const sf::View& GetInnerView () const = 0;
27 
28  virtual Event<ICamera&, const Vector2&>& OnMovedEvent () const = 0;
29  };
30 } // namespace yap
31 
32 #endif // YAPOG_ICAMERA_HPP