Table of Contents

Class 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.

public static class SimpleCombiner

Inheritance

Inherited Members

Methods

AddTriangle(Vertices, Vertices)

Adds the triangle using the specified t

private static Vertices AddTriangle(Vertices t, Vertices vertices)

Parameters

t Vertices

The

vertices Vertices

The vertices

Returns

Vertices

The result

PolygonizeTriangles(List<Vertices>, int, float)

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

public static List<Vertices> PolygonizeTriangles(List<Vertices> triangles, int maxPolys = 2147483647, float tolerance = 0.001)

Parameters

triangles List<Vertices>

The triangles.

maxPolys int

The maximun number of polygons to return.

tolerance float

The tolerance

Returns

List<Vertices>