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

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