TurtleBrains  0.3.1
High quality, portable, C++ framework for rapid 2D game development.
tbu_tile_system_collider.h
1 
9 #ifndef _TurtleBrainsUnstable_TileSystemCollider_h_
10 #define _TurtleBrainsUnstable_TileSystemCollider_h_
11 
12 #include "../tb_tile_system.h"
13 #include "../../math/unstable/tbu_bounding_volume.h"
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_h_ */
Definition: tb_vector.h:47
Here is some information about the primary namespace.
Definition: tb_application_dialog.h:21
This is the heart of TurtleBrains for game developers to create GameScenes and Entities to interact w...