Back to Adaptive Vision Library website
You are here: Start » Function Reference » Shape Features » ShapeOrientation
ShapeOrientation
Computes the shape orientation as angle with value in range 0.0 - 180.0.
Header: | AVL.h |
---|
Syntax
C++
C#
void avl::ShapeOrientation ( const avl::Path& inShape, float& outOrientationAngle )
Parameters
Name | Type | Default | Description | |
---|---|---|---|---|
inShape | const Path& | |||
outOrientationAngle | float& |
Description
Shape orientation can be thought of as the direction in which the shape is oriented. Mathematically it is the angle between X-axis and the line passing through the shape mass center, that rotation around this line produces the smallest torque.
Note that if the input path is not a valid shape (i.e. it has at least one self-intersection), the computation may lead to results that are not intuitive.
Examples
Errors
Error type | Description |
---|---|
DomainError | Open path on input in ShapeOrientation. |
DomainError | Degenerate shape on input in ShapeOrientation. |
See Also
- RegionOrientation – Computes the orientation of a region as an angle of value in range 0.0 - 180.0.