lineSegmentTriangle

fun lineSegmentTriangle(v0: Cartesian3, v1: Cartesian3, p0: Cartesian3, p1: Cartesian3, p2: Cartesian3, cullBackFaces: Boolean? = definedExternally, result: Cartesian3? = definedExternally): Cartesian3(source)

Computes the intersection of a line segment and a triangle.

Return

The intersection point or undefined if there is no intersections.

Parameters

v0

The an end point of the line segment.

v1

The other end point of the line segment.

p0

The first vertex of the triangle.

p1

The second vertex of the triangle.

p2

The third vertex of the triangle.

cullBackFaces

If true, will only compute an intersection with the front face of the triangle and return undefined for intersections with the back face. Default value - false

result

The Cartesian3 onto which to store the result.

See also