Back to Adaptive Vision Library Lite websiteYou are here:
Start »
Shape Relations »
TestPointInShape
Header: | AVL.h |
Namespace: | avl |
Tests whether a point lies inside a shape.
Syntax
void avl::TestPointInShape
(
const avl::Point2D& inPoint,
const avl::Path& inShape,
bool& outIsContained
)
Parameters
|
Name |
Type |
Default |
Description |
|
inPoint |
const Point2D& |
|
Point the position of which will be tested |
|
inShape |
const Path& |
|
Shape against which the position will be tested |
|
outIsContained |
bool& |
|
True if point lies inside the shape, false otherwise |
Description
The operation tests if inPoint lies inside inShape.
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
|
|
TestPointInShape run on the sample data produces the outIsContained = true |
TestPointInShape run on the sample data produces the outIsContained = false |
Errors
List of possible exceptions:
Error type |
Description |
DomainError |
Empty shape on input in TestPointInShape. |
DomainError |
Open path on input in TestPointInShape. |