Given a 3D point (x, y & z), and a triangle made of three other 3D points, how can I determine if the point is in triangle?
I've read a lot about doing this in 2D, the most helpful being http://imusthaveit.spaces.live.com/blog/cns!B5212D3C9F7D8093!410.entry, but I'm struggling to move the concept to 3D - could anyone help with either the general concept or code example?
Ultimately what I'm wanting to do is obtain a list of points that can represent the interior of the triangle.
Are you really talking about 3 points of a triangle or 4 points of a pyramid?
A single point is extremely unlikely to ever exactly be on the plane of a flat triangle in a 3d space.
EDIT:
As an idea for the triangle version (as it seems you want). You could perform 3x2D checks. Discard the Z cooridinates from your check point and the three triangle points, then see if the point is in the plane using your existing method. Then do the same disregarding just the X coordinate and then again disregarding just the Y coordinate. I'm sure its not the most efficient method, but it will be simple to code.