SimpleCombiner
Declaration
public static class tainicom.Aether.Physics2D.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.
Methods
PolygonizeTriangles static
Combine a list of triangles into a list of convex polygons. Note: This only works on triangles.
List<Vertices> PolygonizeTriangles(List<Vertices> triangles, int maxPolys = 2147483647, float tolerance = 0.001)
Parameters:
| Name | Type | Description |
|---|---|---|
triangles |
System.Collections.Generic.List |
The triangles. |
maxPolys |
System.Int32 = 2147483647 |
The maximun number of polygons to return. |
tolerance |
System.Single = 0.001 |
The tolerance |