testPointInTriangle

Test whether the projection of the given point <code>(pX, pY, pZ)</code> lies inside of the triangle defined by the three vertices <code>(v0X, v0Y, v0Z)</code>, <code>(v1X, v1Y, v1Z)</code> and <code>(v2X, v2Y, v2Z)</code>. <p> Reference: <a href="http://www.peroxide.dk/papers/collision/collision.pdf">Improved Collision detection and Response</a>

@param pX the x coordinate of the point to test @param pY the y coordinate of the point to test @param pZ the z coordinate of the point to test @param v0X the x coordinate of the first vertex @param v0Y the y coordinate of the first vertex @param v0Z the z coordinate of the first vertex @param v1X the x coordinate of the second vertex @param v1Y the y coordinate of the second vertex @param v1Z the z coordinate of the second vertex @param v2X the x coordinate of the third vertex @param v2Y the y coordinate of the third vertex @param v2Z the z coordinate of the third vertex @return <code>true</code> if the projection of the given point lies inside of the given triangle; <code>false</code> otherwise

public static
bool
testPointInTriangle
(
double pX
,
double pY
,
double pZ
,
double v0X
,
double v0Y
,
double v0Z
,
double v1X
,
double v1Y
,
double v1Z
,
double v2X
,
double v2Y
,
double v2Z
)

Meta