C# Class FarseerPhysics.Common.PolygonManipulation.SimpleCombiner

Combines a list of triangles into a list of convex polygons. Starts with a seed triangle, keep adding triangles to it until you can't add any more without making the polygon non-convex.
Exibir arquivo Open project: prime31/Nez

Public Methods

Method Description
polygonizeTriangles ( List triangles, int maxPolys = int.MaxValue, float tolerance = 0.001f ) : List

Combine a list of triangles into a list of convex polygons. Note: This only works on triangles.

Private Methods

Method Description
addTriangle ( Vertices t, Vertices vertices ) : Vertices

Method Details

polygonizeTriangles() public static method

Combine a list of triangles into a list of convex polygons. Note: This only works on triangles.
public static polygonizeTriangles ( List triangles, int maxPolys = int.MaxValue, float tolerance = 0.001f ) : List
triangles List The triangles.
maxPolys int The maximun number of polygons to return.
tolerance float The tolerance
return List