intersectRay3d Method

Compute the intersection of a line (parameterized as a ray) with the plane of this triangle.

intersectRay3d(ray: Ray3d, result?: TriangleLocationDetail): TriangleLocationDetail

see BarycentricTriangle.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 d.point:

  • d.isValid returns true if and only if the line intersects the plane.
  • d.classify can be used to determine where the intersection lies with respect to the triangle.
  • d.a is the intersection parameter. If d.a >= 0, the ray intersects the plane of the triangle.

Defined in

Last Updated: 20 June, 2023