Back to Aurora Vision Library website
You are here: Start » Function Reference » Path » Path Metrics » PathToPointDistance
PathToPointDistance
Header: | AVL.h |
---|---|
Namespace: | avl |
Module: | FoundationBasic |
Computes the smallest distance between a path and a point.
Syntax
C++
C#
void avl::PathToPointDistance ( const avl::Point2D& inPoint, const avl::Path& inPath, float inResolution, float& outDistance, atl::Optional<avl::Segment2D&> outConnectingSegment = atl::NIL )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
inPoint | const Point2D& | Input point | |||
inPath | const Path& | Input path | |||
inResolution | float | 0.0 - | 1.0f | ||
outDistance | float& | Minimal distance between input path and input point | |||
outConnectingSegment | Optional<Segment2D&> | NIL | Segment connecting input path and input point having minimal length |
Optional Outputs
The computation of following outputs can be switched off by passing value atl::NIL
to these parameters: outConnectingSegment.
Read more about Optional Outputs.
Description
The operation computes the minimal distance between the inPoint and inPath and, additionally, the outConnectingSegment segment corresponding to the result.
Examples
Errors
List of possible exceptions:
Error type | Description |
---|---|
DomainError | Empty path on input in PathToPointDistance. |
See Also
- PathToPointDistanceProfile – Computes the profile of distances between the specified point and the characteristic points of a path.