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

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