You are here: Start » AVL.NET » AVL.PathTurnAngleMaximum(AvlNet.Path, AvlNet.TurnAngleDirection, AvlNet.TurnAnglePrecision, float, AvlNet.Point2D, float)

AVL.PathTurnAngleMaximum(AvlNet.Path, AvlNet.TurnAngleDirection, AvlNet.TurnAnglePrecision, float, AvlNet.Point2D, float)

Finds the maximum of the profile of turn angles of a path.

Namespace:AvlNet
Assembly:AVL.NET.dll

Syntax


public static void PathTurnAngleMaximum(
	AvlNet.Path inPath,
	AvlNet.TurnAngleDirection inAllowedTurnDirection,
	AvlNet.TurnAnglePrecision inResultPrecision,
	out float outMaximumTurnAngleIndex,
	out AvlNet.Point2D outMaximumTurnAnglePoint,
	out float outMaximumTurnAngleAngle
)

Parameters

inPath
Type: AvlNet.Path
Input path
inAllowedTurnDirection
Type: AvlNet.TurnAngleDirection
Allows to detect only left-turns, only right-turns or both
inResultPrecision
Type: AvlNet.TurnAnglePrecision
Switches between pixel-precise or subpixel-precise detection of the found maximum
outMaximumTurnAngleIndex
Type: System.Single
Index of found maximum
outMaximumTurnAnglePoint
Type: AvlNet.Point2D
Found point of a path with maximum turn angle
outMaximumTurnAngleAngle
Type: System.Single
Maximal turn angle of the input path

Description

The operation computes the profile of turn angles of a path and finds the maximum of the profile. The inAllowedTurnDirection parameter restricts kind of turns taken into consideration (left-turns only, right-turns only or both), while inResultPrecision determines the precision of the resulting maximum point.

Examples

PathTurnAngleMaximum run on the sample path with inAllowedTurnDirection = Right

Errors

Error type Description
DomainError Path with no turn angle on input in PathTurnAngleMaximum.

See also