Changeset 477

Show
Ignore:
Timestamp:
10/05/2009 07:46:36 PM (3 years ago)
Author:
powell
Message:

New debugging output for geomview.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/matml/src/ternary/geomview.c

    r460 r477  
    205205  fprintf (geompipe, "%d %d 0\n", npoints, theboundary->n_edges); 
    206206 
     207#ifdef DEBUG 
     208  printf ("(geometry \"%s\" { : %s })\n", name, label); 
     209  printf ("(read geometry { define %s \n", label); 
     210  printf ("appearance { %s }\nCOFF\n", appearance); 
     211  printf ("%d %d 0\n", npoints, theboundary->n_edges); 
     212#endif 
     213 
    207214  for (i=0; i<npoints; i++) 
    208     fprintf (geompipe, "%g %g %g %g %g %g %g\n", points[i].x, points[i].y, 
    209              points[i].z, points[i].red, points[i].green, points[i].blue, 
    210              points[i].alpha); 
    211  
     215    { 
     216      fprintf (geompipe, "%g %g %g %g %g %g %g\n", points[i].x, points[i].y, 
     217               points[i].z, points[i].red, points[i].green, points[i].blue, 
     218               points[i].alpha); 
     219#ifdef DEBUG 
     220      printf ("%g %g %g %g %g %g %g\n", points[i].x, points[i].y, 
     221              points[i].z, points[i].red, points[i].green, points[i].blue, 
     222              points[i].alpha); 
     223#endif 
     224    } 
    212225  for (i=0; i<theboundary->n_edges; i++) 
    213     fprintf (geompipe, "3 %d %d %d\n", theboundary->edges [c*i], 
    214              (c>1) ? theboundary->edges [c*i+1] : theboundary->edges [c*i], 
    215              (c>2) ? theboundary->edges [c*i+2] : theboundary->edges [c*i]); 
     226    { 
     227      fprintf (geompipe, "3 %d %d %d\n", theboundary->edges [c*i], 
     228               (c>1) ? theboundary->edges [c*i+1] : theboundary->edges [c*i], 
     229               (c>2) ? theboundary->edges [c*i+2] : theboundary->edges [c*i]); 
     230#ifdef DEBUG 
     231      printf ("3 %d %d %d\n", theboundary->edges [c*i], 
     232              (c>1) ? theboundary->edges [c*i+1] : theboundary->edges [c*i], 
     233              (c>2) ? theboundary->edges [c*i+2] : theboundary->edges [c*i]); 
     234#endif 
     235    } 
    216236  fprintf (geompipe, "})\n"); 
     237#ifdef DEBUG 
     238  printf ("})\n"); 
     239#endif 
    217240  fflush (geompipe); 
    218241