Closed vchizhov closed 4 years ago
Not sure how delaunator-cop differs here, but half-edges on the hull have no twins by definition — convex hull forms the outer boundary of the Delaunay triangulation, meaning there are no faces on the outer side.
Another remark is that the hull references point indices, not (half-)edge indices.
Another remark is that the hull references point indices, not (half-)edge indices.
That seems to have been the issue, now everything's as it should be. Shouldn't these comments be edited then:
this._hullPrev = new Uint32Array(n); // edge to prev edge
this._hullNext = new Uint32Array(n); // edge to next edge
this._hullTri = new Uint32Array(n); // edge to adjacent triangle
This is what confused me I guess. Since those are actually vertex idx -> next/prev vertex idx, and -> tri edge idx respectively.
After triangulation, should the hull contain edge indices that have no twins? This doesn't seem to be the case for delaunator-cpp, so I am wondering whether that is a mistake there, or if it's something that's also unsupported by the original code.