Click or drag to resize

UtilIntersectLinePlane Method

Return intersection of line [L1,L2] with plane defined by normal N, and P being a point on the plane.

Namespace:  Demo3D.Common
Assembly:  Demo3D.Common (in Demo3D.Common.dll) Version: 15.0.2.11458
Syntax
C#
public static Vector3 IntersectLinePlane(
	Vector3 L1,
	Vector3 L2,
	Vector3 P,
	Vector3 N
)

Parameters

L1
Type: Microsoft.DirectXVector3
First point on line.
L2
Type: Microsoft.DirectXVector3
Second point on line.
P
Type: Microsoft.DirectXVector3
Point on plane.
N
Type: Microsoft.DirectXVector3
Normal to the plane.

Return Value

Type: Vector3
The intersection point.
Remarks

Note however, that if the line is parallel to the plane, some or all of the components of the Vector3 will be PositiveInfinity, NegativeInfinity or NaN.

See Also