Пример #1
0
    private void TriangulateCase7(int i, Voxel a, Voxel b, Voxel c, Voxel d)
    {
        Vector2 n1 = c.xNormal;
        Vector2 n2 = b.yNormal;

        if (IsSharpFeature(n1, n2))
        {
            Vector2 point = ComputeIntersection(c.XEdgePoint, n1, b.YEdgePoint, n2);
            if (IsInsideCell(point, a, d))
            {
                surface.AddHexagonABC(i, point);
                wall.AddCDBD(i, point);
                return;
            }
        }
        surface.AddPentagonABC(i);
        wall.AddCDBD(i);
    }
Пример #2
0
 public void FillABC(VoxelCell cell, FeaturePoint f)
 {
     if (f.exists)
     {
         surface.AddHexagonABC(cell.i, f.position);
         if (!cell.d.Filled)
         {
             wall.AddCDBD(cell.i, f.position);
         }
     }
     else
     {
         surface.AddPentagonABC(cell.i);
         if (!cell.d.Filled)
         {
             wall.AddCDBD(cell.i);
         }
     }
 }