You are here: Start » AVL.NET » Function Reference » Path » Polygon Relations » AVL.TestPointInPolygon
Tests whether a point lies inside a polygon.
Namespace: | AvlNet |
---|---|
Assembly: | AVL.NET.dll |
Syntax
C++
C#
public static void TestPointInPolygon ( AvlNet.Point2D inPoint, AvlNet.Path inPolygon, out bool outIsContained )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
inPoint | AvlNet.Point2D | Point the position of which will be tested. | |||
inPolygon | AvlNet.Path | Polygon against which the position will be tested. | |||
outIsContained | bool | True if point lies inside the polygon, false otherwise. |
Description
The operation tests if inPoint lies inside inPolygon.
Due to inaccuracy of floating point representation a point lying extremely close to a path may considered to be on either of the sides of the path or exactly on the path itself.
Examples
Errors
List of possible exceptions:
Error type | Description |
---|---|
DomainError | Empty polygon on input in TestPointInPolygon. |
DomainError | Open path on input in TestPointInPolygon. |