Back to Aurora Vision Library website

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

PointToRectangleDistance


Header: AVL.h
Namespace: avl
Module: FoundationLite

Measures the distance between point and rectangle.

Syntax

C++
C#
 
void avl::PointToRectangleDistance
(
	const avl::Point2D& inPoint,
	const avl::Rectangle2D& inRectangle,
	const float inResolution,
	const bool inIsFilled,
	float& outDistance,
	atl::Conditional<avl::Segment2D>& outConnectingSegment
)

Parameters

Name Type Range Default Description
Input value inPoint const Point2D&
Input value inRectangle const Rectangle2D&
Input value inResolution const float 0.0 - 1.0f Number of real-world units per one pixel
Input value inIsFilled const bool True Whether the rectangle is filled inside or not
Output value outDistance float&
Output value outConnectingSegment Conditional<Segment2D>&