C# 클래스 FarseerPhysics.Common.Decomposition.SeidelDecomposer

Convex decomposition algorithm created by Raimund Seidel Properties: - Decompose the polygon into trapezoids, then triangulate. - To use the trapezoid data, use ConvexPartitionTrapezoid() - Generate a lot of garbage due to incapsulation of the Poly2Tri library. - Running time is O(n log n), n = number of vertices. - Running time is almost linear for most simple polygons. - Does not care about winding order. For more information, see Raimund Seidel's paper "A simple and fast incremental randomized algorithm for computing trapezoidal decompositions and for triangulating polygons" See also: "Computational Geometry", 3rd edition, by Mark de Berg et al, Chapter 6.2 "Computational Geometry in C", 2nd edition, by Joseph O'Rourke Original code from the Poly2Tri project by Mason Green. http://code.google.com/p/poly2tri/source/browse?repo=archive#hg/scala/src/org/poly2tri/seidel This implementation is from Dec 14, 2010
파일 보기 프로젝트 열기: prime31/Nez 1 사용 예제들

공개 메소드들

메소드 설명
ConvexPartition ( Vertices vertices, float sheer = 0.001f ) : List

Decompose the polygon into several smaller non-concave polygons.

ConvexPartitionTrapezoid ( Vertices vertices, float sheer = 0.001f ) : List

Decompose the polygon into several smaller non-concave polygons.

메소드 상세

ConvexPartition() 공개 정적인 메소드

Decompose the polygon into several smaller non-concave polygons.
public static ConvexPartition ( Vertices vertices, float sheer = 0.001f ) : List
vertices Vertices The polygon to decompose.
sheer float The sheer to use if you get bad results, try using a higher value.
리턴 List

ConvexPartitionTrapezoid() 공개 정적인 메소드

Decompose the polygon into several smaller non-concave polygons.
public static ConvexPartitionTrapezoid ( Vertices vertices, float sheer = 0.001f ) : List
vertices Vertices The polygon to decompose.
sheer float The sheer to use if you get bad results, try using a higher value.
리턴 List