libgdx/libgdx — pull request #326 by seroperson (2013-04-01 01:45:41+00:00)
Title: Issue #815 EarClippingTriangulator

In this changes I was remade triangulator for more faster work and added some extras.
The only noticeable change for the user - i use another algorithm so my triangles can be not in clockwise order, but these triangles always ( i hope :d ) is valid.
Some numbers ( Triangles / Time ):
Total vertices is 10.002:
New version: 10000 / 2.063 ms;
Old version: 10000 / 4.783 ms;

Total vertices is 20.001 ( 10.000 are collinear ):
New version: 10000 / 2.099ms;
Old version: 10017 / 12.425 ms;

Total vertices is 150.000 ( Rectangle ):
New version: 2 / 4.404ms;
Old version: 75001 / 355.924 ms;

P.S. about "CollinearTrackingLevel" - is a three levels for handle a collinear edges:
Strong - most faster in most of the cases. Used as default. Removing all collinear edges -> Triangulation -> removing all triangles which have area = 0.
Medium - after triangulation will remove all triangles which have area = 0.
Ignore - only triangulation. All another will be ignored.

P.S.S. i used some functions from old triangulator, so check please a "@author ...', because i can take a mistake in this.