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: 15.0.2.11458
Syntax
C#
public static bool TrianglePlaneIntersection(
	Vector3 N,
	Vector3 P,
	Vector3 V1,
	Vector3 V2,
	Vector3 V3,
	ref Vector3 I1,
	ref Vector3 I2
)

Parameters

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

Return Value

Type: 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