コード例 #1
0
 // Mark the outside trapezoids surrounding the polygon
 private void MarkOutside(Trapezoid t)
 {
     if (t.Top == _boundingBox.Top || t.Bottom == _boundingBox.Bottom)
     {
         t.TrimNeighbors();
     }
 }
コード例 #2
0
 // Recursively trim outside neighbors
 public void TrimNeighbors()
 {
     if (Inside)
     {
         Inside = false;
         if (UpperLeft != null)
         {
             UpperLeft.TrimNeighbors();
         }
         if (LowerLeft != null)
         {
             LowerLeft.TrimNeighbors();
         }
         if (UpperRight != null)
         {
             UpperRight.TrimNeighbors();
         }
         if (LowerRight != null)
         {
             LowerRight.TrimNeighbors();
         }
     }
 }