YAPOG  0.0.1
Yet Another Pokemon Online Game
SpatialInfo.hpp
Go to the documentation of this file.
1 #ifndef YAPOG_SPATIALINFO_HPP
2 # define YAPOG_SPATIALINFO_HPP
3 
4 # include <SFML/Graphics/Rect.hpp>
5 
6 # include "YAPOG/Macros.hpp"
8 
9 namespace yap
10 {
12  {
13  public:
14 
15  SpatialInfo ();
16  SpatialInfo (const Vector2& position, const Vector2& size);
17 
18  SpatialInfo (const SpatialInfo& copy);
19  SpatialInfo& operator= (const SpatialInfo& copy);
20 
21  const Vector2& GetPosition () const;
22  const Vector2& GetSize () const;
23 
24  const Vector2& GetTopLeft () const;
25  const Vector2& GetBottomRight () const;
26  const Vector2& GetCenter () const;
27 
28  const FloatRect& GetRectangle () const;
29 
30  void SetPosition (const Vector2& position);
31  void SetSize (const Vector2& size);
32 
33  private:
34 
35  void Init (const Vector2& position, const Vector2& size);
36  void Update ();
37 
40 
44 
46  };
47 } // namespace yap
48 
49 #endif // YAPOG_SPATIALINFO_HPP