You are here: Start » AVL.NET » Function Reference » Path » Path Metrics » AVL.PathToPointDistance

AVL.PathToPointDistance

Computes the smallest distance between a path and a point.

Namespace:AvlNet
Assembly:AVL.NET.dll

Syntax

C++
C#
 
public static void PathToPointDistance
(
	AvlNet.Point2D inPoint,
	AvlNet.Path inPath,
	float inResolution,
	out float outDistance,
	NullableValue<AvlNet.Segment2D> outConnectingSegment
)

Parameters

Name Type Range Default Description
inPointAvlNet.Point2DInput point.
inPathAvlNet.PathInput path.
inResolutionfloat<0.0f, INF>1.0fDefault value: 1.0f.
outDistancefloatMinimal distance between input path and input point.
outConnectingSegmentAvlNet.NullableValue<AvlNet.Segment2D>Segment connecting input path and input point having minimal length. Can be null to skip this parameter calculation.

Description

The operation computes the minimal distance between the inPoint and inPath and, additionally, the outConnectingSegment segment corresponding to the result.

Examples

The PathToPointDistance run on the sample data produces outDistance = 75.373.

Errors

List of possible exceptions:

Error type Description
DomainError Empty path on input in PathToPointDistance.

Function Overrides

See also