polygon collision

BlitzMax Forums/BlitzMax Beginners Area/polygon collision

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Can anyone point me in the right direction as far as something that will show me how to check if two polygons overlap. I have the transformed x and y values in two arrays and the polygons is drawn correctly, but I can't seem to figure out how to get the collision working. Or if someone would be as kind as to show me an easy to follow example of how its done using two sets of pixel coordinates, I would be extremely grateful. Its the only thing missing before I can release my sprite module for bmax.

The vertex data is held in two arrays of variable size depending on how many points the polygon consist of, but at a minimum of three.

Field vx:Int[]
Field vy:Int[]

The points are in clockwise order.

If someone helps me solve this, I will provide them with the sprite module free of charge. Its probably going to be sold at around 25 euros.

[edit] Let me know if more info is needed.