Collision test app

From SuperTux

Jump to: navigation, search

You can download the example application here:

http://www.stud.uni-karlsruhe.de/~uxsm/code/collplayground.tar.gz

For compilation you need to have SDL and SDL_gfx installed.

It demonstrates point-rectangle-, rectangle-rectangle-, point-polygon-, and rectangle-polygon-sweep-tests. You can set start and end-points with the left and right mouse button. With q you can change the shape we collide with from polygon to rectangle. With p you switch to point-tests, with r to rectangle tests. The startpoint is marked green, the endpoint blue and an eventual collision point white.