add a method to calculate distance between a point and triangle, if the projected point is outside the triangle, use shortest distance between the point and all edges