Back to Aurora Vision Library website

You are here: Start » Function Reference » Geometry 2D » Geometry 2D Distance Metrics » SegmentToSegmentDistance

SegmentToSegmentDistance


Header: AVL.h
Namespace: avl
Module: FoundationLite

Measures the distance between two segments.

Syntax

C++
C#
 
void avl::SegmentToSegmentDistance
(
	const avl::Segment2D& inSegment1,
	const avl::Segment2D& inSegment2,
	float inResolution,
	float& outDistance,
	atl::Optional<avl::Segment2D&> outConnectingSegment = atl::NIL
)

Parameters

Name Type Range Default Description
Input value inSegment1 const Segment2D&
Input value inSegment2 const Segment2D&
Input value inResolution float 0.0 - 1.0f Number of real-world units per one pixel
Output value outDistance float&
Output value outConnectingSegment Optional<Segment2D&> NIL

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.

Examples

SegmentToSegmentDistance performed on two sample segments. The green segment is the value of outConnectingSegment output.