TrimNeighbors() public method

public TrimNeighbors ( ) : void
return void
Beispiel #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();
     }
 }
        // 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();
                }
            }
        }