public static float distancePointPlane(float pointX, float pointY, float pointZ,
            float v0X, float v0Y, float v0Z, float v1X, float v1Y, float v1Z, float v2X, float v2Y, float v2Z) {
        float v1Y0Y = v1Y - v0Y;
        float v2Z0Z = v2Z - v0Z;
        float v2Y0Y = v2Y - v0Y;
        float v1Z0Z = v1Z - v0Z;
        float v2X0X = v2X - v0X;
        float v1X0X = v1X - v0X;
        float a = v1Y0Y * v2Z0Z - v2Y0Y * v1Z0Z;
        float b = v1Z0Z * v2X0X - v2Z0Z * v1X0X;
        float c = v1X0X * v2Y0Y - v2X0X * v1Y0Y;
        float d = -(a * v0X + b * v0Y + c * v0Z);
        return distancePointPlane(pointX, pointY, pointZ, a, b, c, d);
    }
public static float distancePointPlane ( float pointX , float pointY , float pointZ , float v0X , float v0Y , float v0Z , float v1X , float v1Y , float v1Z , float v2X , float v2Y , float v2Z ) { float v1Y0Y = v1Y - v0Y ; float v2Z0Z = v2Z - v0Z ; float v2Y0Y = v2Y - v0Y ; float v1Z0Z = v1Z - v0Z ; float v2X0X = v2X - v0X ; float v1X0X = v1X - v0X ; float a = v1Y0Y * v2Z0Z - v2Y0Y * v1Z0Z ; float b = v1Z0Z * v2X0X - v2Z0Z * v1X0X ; float c = v1X0X * v2Y0Y - v2X0X * v1Y0Y ; float d = - ( a * v0X + b * v0Y + c * v0Z ) ; return distancePointPlane ( pointX , pointY , pointZ , a , b , c , d ) ; }
Determine the signed distance of the given point <code>(pointX, pointY, pointZ)</code> to the plane of the triangle specified by its three points
<code>(v0X, v0Y, v0Z)</code>, <code>(v1X, v1Y, v1Z)</code> and <code>(v2X, v2Y, v2Z)</code>.
<p>
If the point lies on the front-facing side of the triangle's plane, that is, if the triangle has counter-clockwise winding order
as seen from the point, then this method returns a positive number.

@param pointX
the x coordinate of the point
@param pointY
the y coordinate of the point
@param pointZ
the z coordinate of the point
@param v0X
the x coordinate of the first vertex of the triangle
@param v0Y
the y coordinate of the first vertex of the triangle
@param v0Z
the z coordinate of the first vertex of the triangle
@param v1X
the x coordinate of the second vertex of the triangle
@param v1Y
the y coordinate of the second vertex of the triangle
@param v1Z
the z coordinate of the second vertex of the triangle
@param v2X
the x coordinate of the third vertex of the triangle
@param v2Y
the y coordinate of the third vertex of the triangle
@param v2Z
the z coordinate of the third vertex of the triangle
@return the signed distance between the point and the plane of the triangle