Back to Adaptive Vision Library website
You are here: Start » Function Reference » Geometry 2D Distance Metrics » SegmentToSegmentDistance
SegmentToSegmentDistance
Measures the distance between two segments.
Syntax
C++
C#
void avl::SegmentToSegmentDistance ( const avl::Segment2D& inSegment1, const avl::Segment2D& inSegment2, atl::real inResolution, atl::real& outDistance, atl::Optional<avl::Segment2D&> outConnectingSegment = atl::NIL )
Parameters
| Name | Type | Range | Default | Description | |
|---|---|---|---|---|---|
![]() |
inSegment1 | const Segment2D& | |||
![]() |
inSegment2 | const Segment2D& | |||
![]() |
inResolution | real | 0.0 - ![]() |
1.0f | Number of real-world units per one pixel |
![]() |
outDistance | real& | |||
![]() |
outConnectingSegment | Optional<Segment2D&> | NIL |
Examples
![]() |
![]() |
SegmentToSegmentDistance performed on two sample segments. The green segment is the value of outConnectingSegment output.





