Skip to content

KBE3D / KBCore / Cesium / IntersectionTests / lineSegmentTriangle

函数: lineSegmentTriangle()

lineSegmentTriangle(v0: Cartesian3, v1: Cartesian3, p0: Cartesian3, p1: Cartesian3, p2: Cartesian3, cullBackFaces?: boolean, result?: Cartesian3): Cartesian3

Computes the intersection of a line segment and a triangle.

参数

v0

Cartesian3

The an end point of the line segment.

v1

Cartesian3

The other end point of the line segment.

p0

Cartesian3

The first vertex of the triangle.

p1

Cartesian3

The second vertex of the triangle.

p2

Cartesian3

The third vertex of the triangle.

cullBackFaces?

boolean

If <code>true</code>, will only compute an intersection with the front face of the triangle and return undefined for intersections with the back face.

result?

Cartesian3

The <code>Cartesian3</code> onto which to store the result.

返回

Cartesian3

The intersection point or undefined if there is no intersections.

KBE3D @3.0.0 Copyright © 2024-present KBE3D