There is indeed a chunk of source on here that does filled polygons.
For checking collisions, point collision is easy-- just iterate the edges of your poly and check that the point is on the inner side of each one. For that you will need to keep your poly winding direction consistent, eg always add vertices clockwise.
For poly-poly collision, go through all the points of poly1 and do the point check above to see if a given point is in poly2. Then reverse the process and check if poly2 points are within poly 1.
There is probably a simpler way of doing it but this should work and should be fast enough if you are using some culling first, like checking intersection of bounding circles.
|