4 Collision::Collision() {}
5 Collision::~Collision() {}
17 if ((a.getDestX() < (b.getDestX() + b.getDestW())) && ((a.getDestX() + a.getDestW()) > b.getDestX()) &&
18 (a.getDestY() < (b.getDestY() + b.getDestH())) && ((a.getDestY() + a.getDestH()) > b.getDestY())) {
28 if (((b.getDestX() + b.getDestW()) < (a.getDestX() + a.getDestW())) && (b.getDestX() > a.getDestX()) &&
29 (b.getDestY() > a.getDestY()) && ((b.getDestY() + b.getDestH()) < (a.getDestY()+a.getDestH()))) {
48 if((a.getPosY() + a.getPosH()) < b.getPosY()) {
56 if(a.getPosY() > (b.getPosY() + b.getPosH())) {
64 if(a.getPosX() > (b.getPosX() + b.getPosW())) {
72 if((a.getPosX() + a.getPosW()) < b.getPosX()) {
This class stores information for an Object in the game.
bool isAbove(Object a, Object b)
Check if the first object is above the second object.
bool isRightOf(Object a, Object b)
Check if the first object is to the right of the second object.
bool outOfBoundsOf(Object a, Object b)
Check if two object are not touching.
bool contains(Object a, Object b)
Check if an object contains another object.
bool isBelow(Object a, Object b)
Check if the first object is below the second object.
bool isLeftOf(Object a, Object b)
Check if the first object is to the left of the second object.
bool isTouching(Object a, Object b)
Check if two objects are touching.