intersectionWithPlane Method

Return the intersection parameter of the line defined by the ray with a plane.

  • Stores the point of intersection in the result point (if passed as a parameter) and returns the parameter along the ray where the intersection occurs. If we call the parameter 'f' then the point of intersection would be ray.origin + f * ray.direction. Therefore:
    • if ray intersects the plane at its origin, the function returns f = 0.
    • if intersects at ray.origin + ray.direction, the function returns f = 1.
    • if intersects behind the ray origin, the function returns f < 0.
    • if intersects after ray.origin + ray.direction, the function returns f > 1.
  • Returns undefined if the ray and plane are parallel or coplanar.

intersectionWithPlane(plane: Plane3dByOriginAndUnitNormal, result?: Point3d): undefined | number

Parameter Type Description
plane Plane3dByOriginAndUnitNormal  
result Point3d  

Returns - undefined | number

Defined in

Last Updated: 17 December, 2024