X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fcollision.hpp;h=d32de1ba3bd40db9550503914c5b65c5b0ff4fb4;hb=84b2c7183da5b9a4d3edcb47ca60a1d5392b905f;hp=d4f58825a5f3e2a0afdccc4a4f0170b35ab32c57;hpb=5b7f9214cb929399f1a855ef5807018a9447d510;p=supertux.git diff --git a/src/collision.hpp b/src/collision.hpp index d4f58825a..d32de1ba3 100644 --- a/src/collision.hpp +++ b/src/collision.hpp @@ -17,7 +17,6 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA // 02111-1307, USA. - #ifndef __COLLISION_H__ #define __COLLISION_H__ @@ -29,6 +28,9 @@ class CollisionHit; class Collision { public: + /** checks if 2 rectangle intersect each other */ + static bool intersects(const Rect& r1, const Rect& r2); + /** does collision detection between 2 rectangles. Returns true in case of * collision and fills in the hit structure then. */