]> git.mxchange.org Git - flightgear.git/commitdiff
Only add non-null polygons to output list.
authorcurt <curt>
Fri, 19 Mar 1999 22:28:46 +0000 (22:28 +0000)
committercurt <curt>
Fri, 19 Mar 1999 22:28:46 +0000 (22:28 +0000)
Clipper/clipper.cxx

index 0a10f32768f7ad3ea5f0e9053e62151a9e5e92a3..2f9e4e3ca827ccb210ae971f85959b40dd1e2898 100644 (file)
@@ -223,7 +223,10 @@ bool FGClipper::clip_all(const point2d& min, const point2d& max) {
            }
            */
 
-           polys_clipped.polys[i].push_back(result_diff);
+           // only add to output list if the clip left us with a polygon
+           if ( result_diff->num_contours > 0 ) {
+               polys_clipped.polys[i].push_back(result_diff);
+           }
            accum = result_union;
        }
     }
@@ -247,6 +250,9 @@ bool FGClipper::clip_all(const point2d& min, const point2d& max) {
 
 
 // $Log$
+// Revision 1.5  1999/03/19 22:28:46  curt
+// Only add non-null polygons to output list.
+//
 // Revision 1.4  1999/03/19 00:26:18  curt
 // Fixed a clipping bug (polygons specified in wrong order).
 // Touched up a few compiler warnings.