Added a function to compute the distance from a point to a face, and a function to test whether a point is inside a triangle.