intersectRayPlane

Test whether the ray with given <code>origin</code> and direction <code>dir</code> intersects the plane containing the given <code>point</code> and having the given <code>normal</code>, and return the value of the parameter <i>t</i> in the ray equation <i>p(t) = origin + t * dir</i> of the intersection point. <p> This method returns <code>-1.0</code> if the ray does not intersect the plane, because it is either parallel to the plane or its direction points away from the plane or the ray's origin is on the <i>negative</i> side of the plane (i.e. the plane's normal points away from the ray's origin). <p> Reference: <a href="https://www.siggraph.org/education/materials/HyperGraph/raytrace/rayplane_intersection.htm">https://www.siggraph.org/</a>

@param origin the ray's origin @param dir the ray's direction @param point a point on the plane @param normal the plane's normal @param epsilon some small epsilon for when the ray is parallel to the plane @return the value of the parameter <i>t</i> in the ray equation <i>p(t) = origin + t * dir</i> of the intersection point, if the ray intersects the plane; <code>-1.0</code> otherwise

Meta