Пример #1
0
    private void TriangulateCase5(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.AddPentagonAC(i, point);
                wall.AddCDAB(i, point);
                return;
            }
        }
        surface.AddQuadAC(i);
        wall.AddCDAB(i);
    }
Пример #2
0
 public void FillAC(VoxelCell cell, FeaturePoint f)
 {
     if (f.exists)
     {
         surface.AddPentagonAC(cell.i, f.position);
         if (!cell.d.Filled)
         {
             wall.AddFromCD(cell.i, f.position);
         }
         if (!cell.b.Filled)
         {
             wall.AddToAB(cell.i, f.position);
         }
     }
     else
     {
         surface.AddQuadAC(cell.i);
         if (!cell.b.Filled)
         {
             wall.AddCDAB(cell.i);
         }
     }
 }