public static float intersectRayPlane(float originX, float originY, float originZ, float dirX, float dirY, float dirZ,
            float pointX, float pointY, float pointZ, float normalX, float normalY, float normalZ, float epsilon) {
        float denom = normalX * dirX + normalY * dirY + normalZ * dirZ;
        if (denom < epsilon) {
            float t = ((pointX - originX) * normalX + (pointY - originY) * normalY + (pointZ - originZ) * normalZ) / denom;
            if (t >= 0.0f)
                return t;
        }
        return -1.0f;
    }
public static float intersectRayPlane ( float originX , float originY , float originZ , float dirX , float dirY , float dirZ , float pointX , float pointY , float pointZ , float normalX , float normalY , float normalZ , float epsilon ) { float denom = normalX * dirX + normalY * dirY + normalZ * dirZ ; if ( denom < epsilon ) { float t = ( ( pointX - originX ) * normalX + ( pointY - originY ) * normalY + ( pointZ - originZ ) * normalZ ) / denom ; if ( t >= 0.0f ) return t ; } return - 1.0f ; }
Test whether the ray with given origin <code>(originX, originY, originZ)</code> and direction <code>(dirX, dirY, dirZ)</code> intersects the plane
containing the given point <code>(pointX, pointY, pointZ)</code> and having the normal <code>(normalX, normalY, normalZ)</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 originX
the x coordinate of the ray's origin
@param originY
the y coordinate of the ray's origin
@param originZ
the z coordinate of the ray's origin
@param dirX
the x coordinate of the ray's direction
@param dirY
the y coordinate of the ray's direction
@param dirZ
the z coordinate of the ray's direction
@param pointX
the x coordinate of a point on the plane
@param pointY
the y coordinate of a point on the plane
@param pointZ
the z coordinate of a point on the plane
@param normalX
the x coordinate of the plane's normal
@param normalY
the y coordinate of the plane's normal
@param normalZ
the z coordinate of 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