You can do it better with this libary i think:

http://www.cs.unc.edu/~geom/collide/index.shtml

with this you can detect all collisions and more.
Ist free and open. But not quite simple.

Do...