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

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