You are here: Start » AVL.NET » Function Reference » Region » Region Features » AVL.RegionOrientation

AVL.RegionOrientation

Computes the orientation of a region as an angle of value in a proper range.

Namespace:AvlNet
Assembly:AVL.NET.dll

Syntax

C++
C#
 
public static void RegionOrientation
(
	AvlNet.Region inRegion,
	AvlNet.AngleRange inAngleRange,
	out float outOrientationAngle
)

Parameters

Name Type Range Default Description
inRegionAvlNet.RegionInput region.
inAngleRangeAvlNet.AngleRange_0_180Switches between ranges <0; 90), <0; 180) and <0; 360)
outOrientationAnglefloat

Description

Region orientation can be thought of as the direction in which the region is oriented. Mathematically it is the angle between X-axis and the line passing through the region mass center, that rotation around this line produces the smallest torque.

Examples

Orientation of the sample region equals to 53.496, which is visualized on the second image by drawing the line of this orientation passing through the region mass center.

Errors

List of possible exceptions:

Error type Description
DomainError Empty region on input in RegionOrientation.

See also