TESStesselator *t;
float v[] = {
1.000f, 4.000f,
1.000f, 0.000f,
0.000f, 0.000f,
0.000f, 1.000f,
4.000f, 1.000f,
4.000f, 0.000f,
3.000f, 0.000f,
};
t = tessNewTess(0);
if(!t) exit(1);
tessAddContour(t, 2, v, sizeof(float)*2, sizeof(v)/sizeof(float)/2);
if(!tessTesselate(t, TESS_WINDING_POSITIVE, TESS_BOUNDARY_CONTOURS, 0, 0, 0)) exit(1);
fprintf(stderr, "elt_n %u\n", tessGetElementCount(t));
v[1] += 0.001f;
t = tessNewTess(0);
if(!t) exit(1);
tessAddContour(t, 2, v, sizeof(float)*2, sizeof(v)/sizeof(float)/2);
if(!tessTesselate(t, TESS_WINDING_POSITIVE, TESS_BOUNDARY_CONTOURS, 0, 0, 0)) exit(1);
fprintf(stderr, "elt_n %u\n", tessGetElementCount(t));
the correct result is 1, can make it produce correct result if move some of the vertexes a tiny bit, or even by adding another contour completly outside of this one
very strange but im 2 dumb to figure out why it hapens
good evening
im geting strange result for a very simple case
outputs
the correct result is 1, can make it produce correct result if move some of the vertexes a tiny bit, or even by adding another contour completly outside of this one
very strange but im 2 dumb to figure out why it hapens