Click or drag to resize

UtilTrianglePlaneIntersection Method

Return the intersection line of a triangle and a plane.

Namespace: Demo3D.Common
Assembly: Demo3D.Common (in Demo3D.Common.dll) Version: 19.01.00
Syntax
C#
public static bool TrianglePlaneIntersection(
	Vector3 N,
	Vector3 P,
	Vector3 V1,
	Vector3 V2,
	Vector3 V3,
	ref Vector3 I1,
	ref Vector3 I2
)

Parameters

N  Vector3
Normal to the plane.
P  Vector3
Point on the plane.
V1  Vector3
First vertex of triangle.
V2  Vector3
Second vertex of triangle.
V3  Vector3
Third vertex of triangle.
I1  Vector3
Calculated start of intersection line.
I2  Vector3
Calculated end intersection line.

Return Value

Boolean
true if they intersect, and I1 and I2 have been set, false otherwise.
Remarks
If the triangle only touches the plane, then I1 and I2 will be equal.
See Also