testRayTriangleFront

Test whether the ray with the given <code>origin</code> and the given <code>dir</code> intersects the frontface of the triangle consisting of the three vertices <code>v0</code>, <code>v1</code> and <code>v2</code>. <p> This is an implementation of the <a href="http://www.graphics.cornell.edu/pubs/1997/MT97.pdf"> Fast, Minimum Storage Ray/Triangle Intersection</a> method. <p> This test implements backface culling, that is, it will return <code>false</code> when the triangle is in clockwise winding order assuming a <i>right-handed</i> coordinate system when seen along the ray's direction, even if the ray intersects the triangle. This is in compliance with how OpenGL handles backface culling with default frontface/backface settings.

@see #testRayTriangleFront(double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double)

@param origin the ray's origin @param dir the ray's direction @param v0 the position of the first vertex @param v1 the position of the second vertex @param v2 the position of the third vertex @param epsilon a small epsilon when testing rays that are almost parallel to the triangle @return <code>true</code> if the given ray intersects the frontface of the triangle; <code>false</code> otherwise

Meta