Back to Adaptive Vision Library website
You are here: Start » Function Reference » Path Metrics » PathToPointDistance
PathToPointDistance
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 |
Description
The operation computes the minimal distance between the inPoint and inPath and, additionally, the outConnectingSegment segment corresponding to the result.
Examples
Errors
Error type | Description |
---|---|
DomainError | Empty path on input in PathToPointDistance. |