]> git.mxchange.org Git - flightgear.git/commitdiff
Changes to support new gpc api with hole tracking support.
authorcurt <curt>
Fri, 16 Apr 1999 00:00:42 +0000 (00:00 +0000)
committercurt <curt>
Fri, 16 Apr 1999 00:00:42 +0000 (00:00 +0000)
Tools/Construct/Clipper/clipper.cxx
Tools/Prep/ShapeFile/shape.cxx

index fafbd6ef8e996637c41df765e95b586a8581c222..501abcdf181ba870b9467a9049efa2293de1e960 100644 (file)
@@ -119,7 +119,7 @@ bool FGClipper::load_polys(const string& path) {
                        << lastx << ", " << lasty );
            }
 
-           gpc_add_contour( poly, &v_list );
+           gpc_add_contour( poly, &v_list, 0 );
 
        }
 
@@ -172,7 +172,7 @@ bool FGClipper::clip_all(const point2d& min, const point2d& max) {
 
     polys_in.safety_base.num_contours = 0;
     polys_in.safety_base.contour = NULL;
-    gpc_add_contour( &polys_in.safety_base, &v_list );
+    gpc_add_contour( &polys_in.safety_base, &v_list, 0 );
 
     // process polygons in priority order
     for ( int i = 0; i < FG_MAX_AREA_TYPES; ++i ) {
@@ -206,11 +206,11 @@ bool FGClipper::clip_all(const point2d& min, const point2d& max) {
                //      << endl;
                // tmp output accum
                FILE *ofp= fopen("tmp-debug", "w");
-               gpc_write_polygon(ofp, &tmp);
+               gpc_write_polygon(ofp, 1, &tmp);
                fclose(ofp);
 
                ofp= fopen("accum-debug", "w");
-               gpc_write_polygon(ofp, &accum);
+               gpc_write_polygon(ofp, 1, &accum);
                fclose(ofp);
 
                gpc_polygon_clip(GPC_DIFF, &tmp, &accum, result_diff);
@@ -259,12 +259,12 @@ bool FGClipper::clip_all(const point2d& min, const point2d& max) {
 
     // tmp output accum
     FILE *ofp= fopen("accum", "w");
-    gpc_write_polygon(ofp, &accum);
+    gpc_write_polygon(ofp, 1, &accum);
     fclose(ofp);
 
     // tmp output safety_base
     ofp= fopen("remains", "w");
-    gpc_write_polygon(ofp, remains);
+    gpc_write_polygon(ofp, 1, remains);
     fclose(ofp);
 
     return true;
index 90a3fadfef0c5ffce976a7c6435dfd0d77332853..f3786d6eb0f470a289304620428c1281691cafa7 100644 (file)
@@ -93,7 +93,7 @@ static void clip_and_write_poly( string root, long int p_index, AreaType area,
 
     base.num_contours = 0;
     base.contour = NULL;
-    gpc_add_contour( &base, &v_list );
+    gpc_add_contour( &base, &v_list, 0 );
 
     // FG_LOG( FG_GENERAL, FG_DEBUG, "base = 4 vertices" );
 
@@ -126,7 +126,7 @@ static void clip_and_write_poly( string root, long int p_index, AreaType area,
        
        FILE *rfp= fopen( polyfile.c_str(), "w" );
        fprintf( rfp, "%s\n", poly_type.c_str() );
-       gpc_write_polygon( rfp, &result );
+       gpc_write_polygon( rfp, 1, &result );
        fclose( rfp );
     }
 
@@ -160,7 +160,7 @@ void add_to_shape(int count, double *coords, gpc_polygon *shape) {
     }
 
     v_list.num_vertices = count;
-    gpc_add_contour( shape, &v_list );
+    gpc_add_contour( shape, &v_list, 0 );
 }