C# 클래스 AForge.Math.Geometry.FlatAnglesOptimizer

Shape optimizer, which removes obtuse angles (close to flat) from a shape.

This shape optimizing algorithm checks all adjacent edges of a shape and substitutes any 2 edges with a single edge if angle between them is greater than MaxAngleToKeep. The algorithm makes sure there are not obtuse angles in a shape, which are very close to flat line.

The shape optimizer does not optimize shapes to less than 3 points, so optimized shape always will have at least 3 points.

For example, the below circle shape comprised of 65 points, can be optimized to 10 points by setting MaxAngleToKeep to 160.

상속: IShapeOptimizer
파일 보기 프로젝트 열기: holisticware-admin/MonoVersal.AForgeNET 1 사용 예제들

공개 메소드들

메소드 설명
FlatAnglesOptimizer ( ) : System

Initializes a new instance of the FlatAnglesOptimizer class.

FlatAnglesOptimizer ( float maxAngleToKeep ) : System

Initializes a new instance of the FlatAnglesOptimizer class.

OptimizeShape ( List shape ) : List

Optimize specified shape.

메소드 상세

FlatAnglesOptimizer() 공개 메소드

Initializes a new instance of the FlatAnglesOptimizer class.
public FlatAnglesOptimizer ( ) : System
리턴 System

FlatAnglesOptimizer() 공개 메소드

Initializes a new instance of the FlatAnglesOptimizer class.
public FlatAnglesOptimizer ( float maxAngleToKeep ) : System
maxAngleToKeep float Maximum acceptable angle between two edges of a shape (see ).
리턴 System

OptimizeShape() 공개 메소드

Optimize specified shape.
public OptimizeShape ( List shape ) : List
shape List Shape to be optimized.
리턴 List