Yes, sorry I ment a polyhedron.

I'm learning navigation meshes so I'm making a mapping system to assist in the learning process. I'm starting small and adding/changing functionaliy as I get more and more indepth with navigation meshes. At this stage and had I very basic 2D implementation and am now expanding it into 3D. I have a fixed starting point (that will become moveable further down the line) and I'm trying to get the shortest path to 'area A'. When the pathfinding system intializes, it goes through all of the (at this point, fixed) destinations and tries to determine which nav mesh points are inside it; those points are stored as goal points so that when pathfinding is executed the system says 'okay, I'm starting at point #37 and I'm looking for the shortest route to either point #98, 99 or 100'.

I found http://www.ecse.rpi.edu/Homepages/wrf/Research/Short_Notes/pnpoly.html to determine if a 2D point is in a 2D space (polygon), and now I'm trying to figure out how to determine if a 3D point is in a 3D space (polyhedron).

*** Edit ***

Of course, now that I'm using the, you know, correct term, I'm hitting some hits on Google. Funny how that works. I'll Google around but I'd still appreciate any help. I'm thinking I good / easy way to go about it is to extend PNPoly into 3D, but unfortantly I don't understand the Math. Conceptually I understand it's firing a ray to the right and counting the number of edge's it crosses, but the Math is flying over my head.

**Edited by AnEverydayGuy, 05 June 2014 - 10:12 AM.**