Arch Game Engine  0.2
collision.h
1 #ifndef COLLISION_H
2 #define COLLISION_H
3 
4 class Object;
5 
7 class Collision {
8 private:
9 public:
10  Collision();
11  ~Collision();
13  bool isTouching(Object a, Object b);
15  bool contains(Object a, Object b);
17  bool outOfBoundsOf(Object a, Object b);
19  bool isAbove(Object a, Object b);
21  bool isBelow(Object a, Object b);
23  bool isRightOf(Object a, Object b);
25  bool isLeftOf(Object a, Object b);
26  bool overlaps(Object a, Object b);
27 };
28 
29 #endif //COLLISION_H
This class stores information for an Object in the game.
Definition: object.h:12
bool isAbove(Object a, Object b)
Check if the first object is above the second object.
Definition: collision.cpp:47
bool isRightOf(Object a, Object b)
Check if the first object is to the right of the second object.
Definition: collision.cpp:63
bool outOfBoundsOf(Object a, Object b)
Check if two object are not touching.
Definition: collision.cpp:37
bool contains(Object a, Object b)
Check if an object contains another object.
Definition: collision.cpp:26
bool isBelow(Object a, Object b)
Check if the first object is below the second object.
Definition: collision.cpp:55
Class used for calculating different types of collision between given Objects.
Definition: collision.h:7
bool isLeftOf(Object a, Object b)
Check if the first object is to the left of the second object.
Definition: collision.cpp:71
bool isTouching(Object a, Object b)
Check if two objects are touching.
Definition: collision.cpp:7