public void AddCell(Cell cell, TriangleCells cellDir) { if (Cells.ContainsKey(cellDir)) { return; } Cells.Add(cellDir, cell); }
private static Cell BuildPartialCell(Triangle tri, Vector2Int pos, TriangleCells cellDir) { var cell = tri.CreateCell(pos); tri.AddCell(cell, cellDir); var newTri = tri; do { cell.AddTris(newTri.GeoTri); newTri = newTri.Right; } while (newTri != tri); return(cell); }