main/src/georegression/metric/Distance3D_F64.java
public static double distance( Triangle3D_F64 triangle, Point3D_F64 point ) {

		DistancePointTriangle3D_F64 alg = new DistancePointTriangle3D_F64();
		alg.setTriangle(triangle.v0,triangle.v1,triangle.v2);

		Point3D_F64 cp = new Point3D_F64();

		alg.closestPoint(point,cp);

		double d = point.distance(cp);

		return alg.sign(point)*d;
	}
public static double distance( Triangle3D_F64 triangle, Point3D_F64 point ) {

		DistancePointTriangle3D_F64 alg = new DistancePointTriangle3D_F64();
		alg.setTriangle(triangle.v0,triangle.v1,triangle.v2);

		Point3D_F64 cp = new Point3D_F64();

		alg.closestPoint(point,cp);

		double d = point.distance(cp);

		return alg.sign(point)*d;
	}
Signed distance from a 3D point to 3D triangle.   The sign indicates which side of the triangle the point
is on.  See {@link georegression.metric.alg.DistancePointTriangle3D_F64} for the details.

@param triangle 3D triangle
@param point Point for which the closest point on the triangle is found
@return The closest point