C# 클래스 FarseerPhysics.Common.PolygonManipulation.SimplifyTools

Provides a set of tools to simplify polygons in various ways.
파일 보기 프로젝트 열기: prime31/Nez 1 사용 예제들

공개 메소드들

메소드 설명
collinearSimplify ( Vertices vertices, float collinearityTolerance ) : Vertices

Removes all collinear points on the polygon.

douglasPeuckerSimplify ( Vertices vertices, float distanceTolerance ) : Vertices

Ramer-Douglas-Peucker polygon simplification algorithm. This is the general recursive version that does not use the speed-up technique by using the Melkman convex hull. If you pass in 0, it will remove all collinear points.

mergeIdenticalPoints ( Vertices vertices ) : Vertices

Merges the identical points in the polygon.

mergeParallelEdges ( Vertices vertices, float tolerance ) : Vertices

Merges all parallel edges in the list of vertices

reduceByArea ( Vertices vertices, float areaTolerance ) : Vertices

Simplify the polygon by removing all points that in pairs of 3 have an area less than the tolerance. Pass in 0 as tolerance, and it will only remove collinear points.

reduceByDistance ( Vertices vertices, float distance ) : Vertices

Reduces the polygon by distance.

reduceByNth ( Vertices vertices, int nth ) : Vertices

Reduces the polygon by removing the Nth vertex in the vertices list.

비공개 메소드들

메소드 설명
simplifySection ( Vertices vertices, int i, int j, bool usePoint, float distanceTolerance ) : void

메소드 상세

collinearSimplify() 공개 정적인 메소드

Removes all collinear points on the polygon.
public static collinearSimplify ( Vertices vertices, float collinearityTolerance ) : Vertices
vertices Vertices The polygon that needs simplification.
collinearityTolerance float The collinearity tolerance.
리턴 Vertices

douglasPeuckerSimplify() 공개 정적인 메소드

Ramer-Douglas-Peucker polygon simplification algorithm. This is the general recursive version that does not use the speed-up technique by using the Melkman convex hull. If you pass in 0, it will remove all collinear points.
public static douglasPeuckerSimplify ( Vertices vertices, float distanceTolerance ) : Vertices
vertices Vertices
distanceTolerance float
리턴 Vertices

mergeIdenticalPoints() 공개 정적인 메소드

Merges the identical points in the polygon.
public static mergeIdenticalPoints ( Vertices vertices ) : Vertices
vertices Vertices The vertices.
리턴 Vertices

mergeParallelEdges() 공개 정적인 메소드

Merges all parallel edges in the list of vertices
public static mergeParallelEdges ( Vertices vertices, float tolerance ) : Vertices
vertices Vertices The vertices.
tolerance float The tolerance.
리턴 Vertices

reduceByArea() 공개 정적인 메소드

Simplify the polygon by removing all points that in pairs of 3 have an area less than the tolerance. Pass in 0 as tolerance, and it will only remove collinear points.
public static reduceByArea ( Vertices vertices, float areaTolerance ) : Vertices
vertices Vertices
areaTolerance float
리턴 Vertices

reduceByDistance() 공개 정적인 메소드

Reduces the polygon by distance.
public static reduceByDistance ( Vertices vertices, float distance ) : Vertices
vertices Vertices The vertices.
distance float The distance between points. Points closer than this will be removed.
리턴 Vertices

reduceByNth() 공개 정적인 메소드

Reduces the polygon by removing the Nth vertex in the vertices list.
public static reduceByNth ( Vertices vertices, int nth ) : Vertices
vertices Vertices The vertices.
nth int The Nth point to remove. Example: 5.
리턴 Vertices