I happen to use the edge crossing method as stated by an earlier post. It works for convex and
concave polygons and only requires counting of crossing edges to determine in/out for any polygon, not just triangles. If odd number of crossings then interior to poly. Below is included the
code that I used for testing points in/out of polys in the projection plane. You can easily
modify it for 3D points and your own data structures. In 3D just determine the largest component
of the polygon normal and use the other two coordinates for the 2D projection. The algorithm
works perfectly well that way. I would have sent the 3D version, but I found this version first.
The only difference is a little code right at the beginning to determine whether I use XY, XZ, or