C# Class DrewNoakes.QuadrilateralFinder.QuadrilateralFinder

Mostra file Open project: drewnoakes/quadrilateral-finder Class Usage Examples

Public Methods

Method Description
FindQuadrilateral ( IEnumerable lineSegments ) : DrewNoakes.QuadrilateralFinder.Intersection[]

Detects the most likely quadrilateral shape formed by four line segments from lineSegments. Possible solutions are evaluated based upon the closeness of corner angles to 90°, and penalties are assigned if line segments would intersect within their spans.

Private Methods

Method Description
CalculateError ( Intersection intersections ) : double
GetAcuteAngleBetweenPoints ( Vector2 p1, Vector2 p2, Vector2 p3 ) : double

Method Details

FindQuadrilateral() public static method

Detects the most likely quadrilateral shape formed by four line segments from lineSegments. Possible solutions are evaluated based upon the closeness of corner angles to 90°, and penalties are assigned if line segments would intersect within their spans.
public static FindQuadrilateral ( IEnumerable lineSegments ) : DrewNoakes.QuadrilateralFinder.Intersection[]
lineSegments IEnumerable
return DrewNoakes.QuadrilateralFinder.Intersection[]