コード例 #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();
         }
     }
 }