intersectRay3d Method
Compute the intersection of a line (parameterized as a ray) with the plane of this triangle.
- This method is slower than Ray3d.intersectionWithTriangle.
intersectRay3d(ray: Ray3d, result?: TriangleLocationDetail): TriangleLocationDetail
@returns  details d of the line-plane intersection point d.world:
- d.ais the intersection parameter along the ray.
- The line intersects the plane of the triangle if and only if d.isValidreturns true.
- The ray intersects the plane of the triangle if and only if d.isValidreturns true andd.a>= 0.
- The ray intersects the triangle if and only if d.isValidreturns true,d.a>= 0, andd.isInsideOrOnreturns true.
- d.classifycan be used to determine where the intersection lies with respect to the triangle.
- Visualization can be found at https://www.itwinjs.org/sandbox/SaeedTorabi/RayTriangleIntersection
@see pointToFraction
| Parameter | Type | Description | 
|---|---|---|
| ray | Ray3d | infinite line to intersect, as a ray | 
| result | TriangleLocationDetail | optional pre-allocated object to fill and return | 
Returns - TriangleLocationDetail
details d of the line-plane intersection point d.world:
- d.ais the intersection parameter along the ray.
- The line intersects the plane of the triangle if and only if d.isValidreturns true.
- The ray intersects the plane of the triangle if and only if d.isValidreturns true andd.a>= 0.
- The ray intersects the triangle if and only if d.isValidreturns true,d.a>= 0, andd.isInsideOrOnreturns true.
- d.classifycan be used to determine where the intersection lies with respect to the triangle.
- Visualization can be found at https://www.itwinjs.org/sandbox/SaeedTorabi/RayTriangleIntersection
Defined in
- geometry3d/BarycentricTriangle.ts Line 522
Last Updated: 24 June, 2025
Found something wrong, missing, or unclear on this page? Raise an issue in our repo.