intersectSegment Method

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

intersectSegment(point0: Point3d, point1: Point3d, result?: TriangleLocationDetail): TriangleLocationDetail

see BarycentricTriangle.intersectRay3d

Parameter Type Description
point0 Point3d start point of segment on line to intersect
point1 Point3d end point of segment on line to intersect
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 is in [0,1], the segment intersects the plane of the triangle.

Defined in

Last Updated: 30 November, 2023