Click or drag to resize

UtilLineLineNearestPoints Method

Finds a point on each line that determines the shortest line segment between the two lines.

Namespace:  Demo3D.Common
Assembly:  Demo3D.Common (in Demo3D.Common.dll) Version: 15.0.2.11458
Syntax
C#
public static void LineLineNearestPoints(
	Vector3 p1,
	Vector3 d1,
	Vector3 p2,
	Vector3 d2,
	out Vector3 c1,
	out Vector3 c2
)

Parameters

p1
Type: Microsoft.DirectXVector3
A point on the first line.
d1
Type: Microsoft.DirectXVector3
The direction of the first line (must be unit vector).
p2
Type: Microsoft.DirectXVector3
A point on the second line.
d2
Type: Microsoft.DirectXVector3
The direction of the second line (must be unit vector).
c1
Type: Microsoft.DirectXVector3
The determined closest point on the first line.
c2
Type: Microsoft.DirectXVector3
The determined closest point on the second line.
See Also