]> git.rm.cloudns.org Git - xonotic/netradiant.git/commitdiff
Adding winding_logging.patch to disappearing_sliver regression test that
authorrambetter <rambetter>
Tue, 28 Dec 2010 10:41:41 +0000 (10:41 +0000)
committerrambetter <rambetter>
Tue, 28 Dec 2010 10:41:41 +0000 (10:41 +0000)
helps log the vertex coords.

git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@372 8a3a26a2-13c4-0310-b231-cf6edde360e5

regression_tests/q3map2/disappearing_sliver/README.txt
regression_tests/q3map2/disappearing_sliver/winding_logging.patch [new file with mode: 0644]

index bcbe49e9c3445406509a8da80f76fbf1186b0302..491540303893c8556d056331563e9f50c9f1225d 100644 (file)
@@ -103,9 +103,7 @@ ChopWindingInPlace() calls in the above stack trace:
   (87.989571 -891.969116 -768.174316)
   (133.998917 -1014.997314 0.000000)
 
-(If you want to print this out for yourself, print out the coordinates of the
-winding_t "w" parameter right after the ChopWindingInPlace() call in
-CreateBrushWindings() in brush.c.)
+(If you want to print this out for yourself, use winding_logging.patch.)
 
 The same vertices after the bugfix have the following coordinates:
 
diff --git a/regression_tests/q3map2/disappearing_sliver/winding_logging.patch b/regression_tests/q3map2/disappearing_sliver/winding_logging.patch
new file mode 100644 (file)
index 0000000..c697eb9
--- /dev/null
@@ -0,0 +1,87 @@
+Index: tools/quake3/q3map2/brush.c
+===================================================================
+--- tools/quake3/q3map2/brush.c        (revision 371)
++++ tools/quake3/q3map2/brush.c        (working copy)
+@@ -356,17 +356,29 @@
+       winding_t       *w;
+       side_t          *side;
+       plane_t         *plane;
++
++      static  int     brushord = -1;
++      brushord++;
++
++      Sys_Printf("In CreateBrushWindings() for brush %i\n", brushord);        
+       
+-      
+       /* walk the list of brush sides */
+       for( i = 0; i < brush->numsides; i++ )
+       {
++              Sys_Printf("    Handling side %i on the brush\n", i);
++
+               /* get side and plane */
+               side = &brush->sides[ i ];
+               plane = &mapplanes[ side->planenum ];
+               
+               /* make huge winding */
+               w = BaseWindingForPlane( plane->normal, plane->dist );
++
++              Sys_Printf("        Before clipping we have:\n");
++              int z;
++              for (z = 0; z < w->numpoints; z++) {
++                      Sys_Printf("            (%.8f %.8f %.8f)\n", w->p[z][0], w->p[z][1], w->p[z][2]);
++              }
+               
+               /* walk the list of brush sides */
+               for( j = 0; j < brush->numsides && w != NULL; j++ )
+@@ -379,6 +391,11 @@
+                               continue;
+                       plane = &mapplanes[ brush->sides[ j ].planenum ^ 1 ];
+                       ChopWindingInPlace( &w, plane->normal, plane->dist, 0 ); // CLIP_EPSILON );
++
++                      Sys_Printf("        After clipping w/ side %i we have:\n", j);
++                      for (z = 0; z < w->numpoints; z++) {
++                              Sys_Printf("            (%.8f %.8f %.8f)\n", w->p[z][0], w->p[z][1], w->p[z][2]);
++                      }
+                       
+                       /* ydnar: fix broken windings that would generate trifans */
+                       FixWinding( w );
+Index: tools/quake3/q3map2/map.c
+===================================================================
+--- tools/quake3/q3map2/map.c  (revision 371)
++++ tools/quake3/q3map2/map.c  (working copy)
+@@ -803,7 +803,11 @@
+       char                    shader[ MAX_QPATH ];
+       int                             flags;
+       
++      static  int     brushord = -1;
++      brushord++;
+       
++      Sys_Printf("In ParseRawBrush() for brush %i\n", brushord);
++
+       /* initial setup */
+       buildBrush->numsides = 0;
+       buildBrush->detail = qfalse;
+@@ -812,9 +816,12 @@
+       if( g_bBrushPrimit == BPRIMIT_NEWBRUSHES )
+               MatchToken( "{" );
+       
++      int sideord = -1;
++
+       /* parse sides */
+       while( 1 )
+       {
++              sideord++;
+               if( !GetToken( qtrue ) )
+                       break;
+               if( !strcmp( token, "}" ) )
+@@ -917,6 +924,10 @@
+               }
+               
+               /* find the plane number */
++              Sys_Printf("    Side %i:\n", sideord);
++              Sys_Printf("        (%f %f %f)\n", planePoints[0][0], planePoints[0][1], planePoints[0][2]);
++              Sys_Printf("        (%f %f %f)\n", planePoints[1][0], planePoints[1][1], planePoints[1][2]);
++              Sys_Printf("        (%f %f %f)\n", planePoints[2][0], planePoints[2][1], planePoints[2][2]);
+               planenum = MapPlaneFromPoints( planePoints );
+               side->planenum = planenum;
+