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 beray.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
- geometry3d/Ray3d.ts Line 351
Last Updated: 14 November, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.