intersectRayPlane

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

  1. double intersectRayPlane(double originX, double originY, double originZ, double dirX, double dirY, double dirZ, double pointX, double pointY, double pointZ, double normalX, double normalY, double normalZ, double epsilon)
    static
    double
    intersectRayPlane
    (
    double originX
    ,
    double originY
    ,
    double originZ
    ,
    double dirX
    ,
    double dirY
    ,
    double dirZ
    ,
    double pointX
    ,
    double pointY
    ,
    double pointZ
    ,
    double normalX
    ,
    double normalY
    ,
    double normalZ
    ,
    double epsilon
    )
  2. double intersectRayPlane(Vector3d origin, Vector3d dir, Vector3d point, Vector3d normal, double epsilon)
  3. double intersectRayPlane(double originX, double originY, double originZ, double dirX, double dirY, double dirZ, double a, double b, double c, double d, double epsilon)

Meta