neighbors method
Returns the neighboring triangle indices for each triangle. Returns -1 for edges on the convex hull (no neighbor).
Implementation
Iterable<List<int>> neighbors() sync* {
for (int i = 0; i < trianglesLength; i++) {
yield [
_triangleOfEdge(halfedges[i * 3]),
_triangleOfEdge(halfedges[i * 3 + 1]),
_triangleOfEdge(halfedges[i * 3 + 2]),
];
}
}