Esempio n. 1
0
 public virtual void DeletePolygon(Polygon polygon)
 {
     if (Polygons.Contains(polygon))
     {
         Polygons.Remove(polygon);
     }
 }
Esempio n. 2
0
 public void AddPolygon(Polygon p2)
 {
     if (!Polygons.Contains(p2))
     {
         Polygons.Add(p2);
     }
 }
Esempio n. 3
0
 public void RemovePolygon(Polygon polygon)
 {
     foreach (Corner corner in new List <Corner>(polygon.Corners))
     {
         RemoveCorner(corner);
     }
     if (Polygons.Contains(polygon))
     {
         //  This should not happen, removing last corner should remove polygon
         System.Diagnostics.Trace.TraceError("polygon should have been removed");
     }
 }
Esempio n. 4
0
 public void Render(DirectBitmap bitmap, Graphics g)
 {
     foreach (var polygon in MainForm.Polygons)
     {
         if (!Polygons.Contains(polygon))
         {
             polygon.Render(bitmap, MainForm.ColorFill, MainForm.BumpMapping);
         }
         else
         {
             polygon.Render(bitmap, MarkedColor, MainForm.ColorFill, MainForm.BumpMapping);
         }
     }
 }