The BIG COMMIT(tm)
[supertux.git] / lib / special / collision.h
1 #ifndef __COLLISION_H__
2 #define __COLLISION_H__
3
4 namespace SuperTux
5 {
6
7 class Rectangle;
8 class CollisionHit;
9 class AATriangle;
10
11 class Collision
12 {
13 public:
14   /** does collision detection between 2 rectangles. Returns true in case of
15    * collision and fills in the hit structure then.
16    */
17   static bool rectangle_rectangle(CollisionHit& hit, const Rectangle& r1,
18       const Rectangle& r2);
19
20   /** does collision detection between a rectangle and an axis aligned triangle
21    * Returns true in case of a collision and fills in the hit structure then.
22    */                                                                         
23   static bool rectangle_aatriangle(CollisionHit& hit, const Rectangle& rect,
24       const AATriangle& triangle);                                            
25 };
26
27 }
28
29 #endif
30