Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

2D All the way! / Help With Polygon Collision Math

Author
Message
w1nterl0ng
22
Years of Service
User Offline
Joined: 22nd Oct 2003
Location:
Posted: 29th Sep 2004 23:29
Hi All, I am writing an app that has lot's of points in latitude and longitude. I allow the user to draw a polygon, I then need to calculate which of the points fall in that polygonal space. Additionally I would like to identify the points that are within a given proximity of that space as well, but that is not as important right now.
Does anuone have any info on thse routines?

Thanks, Fred

=====================================
Fred Anderson :: www.speedcircuit.com
=====================================
Kohaku
22
Years of Service
User Offline
Joined: 3rd May 2004
Location: The not very United Kingdom
Posted: 30th Sep 2004 00:32
I think you mean pixels.

Absent.
Van B
Moderator
23
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 30th Sep 2004 00:39
If you look here -

http://www.underwaredesign.com/

You should find a 2D point-in-poly example, it's a neat little function that you pass to check location and polygon edge locations too, and it simply tells you if it's inside. Nice and neat.


Van-B


Muhahahahaha.
dj chainz
21
Years of Service
User Offline
Joined: 25th Sep 2004
Location: England
Posted: 2nd Oct 2004 07:43
very useful stuff!
things like polygonal collision (no 3D polygons) are faster than 2d sprite code, so will be ideal for my sonic-like games engine!!

visit http://dbgame.blogspot.com on how to make a commercial-level game engine

Login to post a reply

Server time is: 2026-06-11 17:33:47
Your offset time is: 2026-06-11 17:33:47