You are here: Start » AVL.NET » AVL.RegionToRegionDistance(AvlNet.Region, AvlNet.Region, float, float, AvlNet.Segment2D)

AVL.RegionToRegionDistance(AvlNet.Region, AvlNet.Region, float, float, AvlNet.Segment2D)

Namespace:AvlNet
Assembly:AVL.NET.dll

Syntax


public static void RegionToRegionDistance(
	AvlNet.Region inRegion1,
	AvlNet.Region inRegion2,
	float inResolution,
	out float outDistance,
	out AvlNet.Segment2D outConnectingSegment
)

Parameters

inRegion1
Type: AvlNet.Region
inRegion2
Type: AvlNet.Region
inResolution
Type: System.Single
outDistance
Type: System.Single
outConnectingSegment
Type: AvlNet.Segment2D

Description

Operation computes length of the shortest segment that connects center of one of inRegion1's point which center of one of inRegion2's point.

Examples

RegionToRegionDistance performed on sample regions produced outDistance = 118,5116. The shortest segment connecting regions is presented on the bottom image

Remarks

  • inRegion1 and inRegion2 must not be empty, otherwise an error with appropriate description occurs.

Errors

Error type Description
DomainError One of input regions in RegionToRegionDistance is empty.

See also