C# Class 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
Afficher le fichier Open project: prime31/Nez Class Usage Examples

Méthodes publiques

Méthode Description
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.

Method Details

ConvexPartition() public static méthode

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.
Résultat List

ConvexPartitionTrapezoid() public static méthode

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.
Résultat List