TurtleBrains  0.3.5
High quality, portable, C++ framework for rapid 2D game development.
tbu_tile_system_collider.hpp
1 
9 #ifndef _TurtleBrainsUnstable_TileSystemCollider_hpp
10 #define _TurtleBrainsUnstable_TileSystemCollider_hpp
11 
12 #include <turtle_brains/game/tb_tile_system.hpp>
13 #include <turtle_brains/math/unstable/tbu_bounding_volume.hpp>
14 
15 #include <vector>
16 
18 
19 namespace TurtleBrains
20 {
21  namespace Game
22  {
23  namespace Unstable
24  {
25 
26  class TileSystemCollider
27  {
28  public:
29  bool MoveEntity(const tbMath::Vector2& currentPosition, tbMath::Vector2& finalPosition,
30  const tbMath::Unstable::BoundingVolume& boundingVolume) const;
31 
32  bool IsPointInSolid(const tbMath::Vector2& pointPosition) const;
33 
36  void ClearStaticObjects(void);
37 
40  void AddStaticObject(const tbMath::Unstable::BoundingVolume& boundingVolume, const tbMath::Vector2& centerPosition);
41 
42  private:
43  struct Object
44  {
45  Object(const tbMath::Unstable::BoundingVolume& boundingVolume, const tbMath::Vector2& centerPosition);
46 
47  tbMath::Unstable::BoundingVolume mBoundingVolume;
48  tbMath::Vector2 mCenterPosition;
49  };
50 
51  typedef std::vector<Object> ObjectContainer;
52  ObjectContainer mStaticObjects;
53  };
54 
55  }; /* namespace Unstable */
56  }; /* namespace Game */
57 }; /* namespace TurtleBrains */
58 
60 
61 namespace tbGame = TurtleBrains::Game;
62 
63 #endif /* _TurtleBrainsUnstable_TileSystemCollider_hpp */
Definition: tb_vector.hpp:48
Here is some information about the primary namespace.
Definition: tb_application_dialog.hpp:21
This is the heart of TurtleBrains for game developers to create GameScenes and Entities to interact w...