C# Class Project290.Physics.Common.Decomposition.FlipcodeDecomposer

Triangulates a polygon into triangles. Doesn't handle holes.
Datei anzeigen Open project: scastle/Solitude

Public Methods

Method Description
ConvexPartition ( Vertices contour ) : List

Decompose the polygon into triangles

Private Methods

Method Description
InsideTriangle ( Vector2 &a, Vector2 &b, Vector2 &c, Vector2 &p ) : bool

Check if the point P is inside the triangle defined by the points A, B, C

Snip ( Vertices contour, int u, int v, int w, int n, int V ) : bool

Cut a the contour and add a triangle into V to describe the location of the cut

Method Details

ConvexPartition() public static method

Decompose the polygon into triangles
public static ConvexPartition ( Vertices contour ) : List
contour Vertices The list of points describing the polygon
return List