private void TriangulateCase10(int i, Voxel a, Voxel b, Voxel c, Voxel d) { Vector2 n1 = a.xNormal; Vector2 n2 = c.xNormal; if (IsSharpFeature(n1, n2)) { Vector2 point = ComputeIntersection(a.XEdgePoint, n1, c.XEdgePoint, n2); if (IsInsideCell(point, a, d)) { surface.AddPentagonBD(i, point); wall.AddABCD(i, point); return; } } surface.AddQuadBD(i); wall.AddABCD(i); }
public void FillBD(VoxelCell cell, FeaturePoint f) { if (f.exists) { surface.AddPentagonBD(cell.i, f.position); if (!cell.a.Filled) { wall.AddFromAB(cell.i, f.position); } if (!cell.c.Filled) { wall.AddToCD(cell.i, f.position); } } else { surface.AddQuadBD(cell.i); if (!cell.a.Filled) { wall.AddABCD(cell.i); } } }