ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/cv/rad2mgf.c
(Generate patch)

Comparing ray/src/cv/rad2mgf.c (file contents):
Revision 2.4 by greg, Sat Jul 9 09:42:48 1994 UTC vs.
Revision 2.7 by greg, Wed Dec 7 12:44:05 1994 UTC

# Line 15 | Line 15 | static char SCCSid[] = "$SunId$ LBL";
15   #include "color.h"
16   #include "lookup.h"
17  
18 + #define PI      3.14159265358979323846
19 +
20   int     o_face(), o_cone(), o_sphere(), o_ring(), o_cylinder();
21   int     o_instance(), o_source(), o_illum();
22   int     o_plastic(), o_metal(), o_glass(), o_mirror(), o_trans(), o_light();
# Line 80 | Line 82 | char   **argv;
82                                  goto unkopt;
83                          }
84                          break;
85 +                default:
86 +                        goto unkopt;
87                  }
88          init();
89          if (i >= argc)
# Line 306 | Line 310 | uninit()                       /* mark end of MGF file */
310   }
311  
312  
313 + clrverts()                      /* clear vertex table */
314 + {
315 +        register int    i;
316 +
317 +        lu_done(&vertab);
318 +        for (i = 0; i < NVERTS; i++)
319 +                vert[i].lused = 0;
320 +        lu_init(&vertab, NVERTS);
321 + }
322 +
323 +
324   add2dispatch(name, func)        /* add function to dispatch table */
325   char    *name;
326   int     (*func)();
# Line 511 | Line 526 | FUNARGS        *fa;
526                  fputs(fa->sarg[i], stdout);
527          }
528          putchar('\n');
529 +        clrverts();                     /* vertex id's no longer reliable */
530          return(0);
531   }
532  
# Line 714 | Line 730 | register FUNARGS       *fa;
730          puts("\tc");
731          if (d > FTINY)
732                  printf("\t\tcxy %.4f %.4f\n", cxyz[0]/d, cxyz[1]/d);
733 <        printf("\ted %.4g\n", cxyz[1]*WHTEFFICACY);
733 >        printf("\ted %.4g\n", cxyz[1]*(PI*WHTEFFICACY));
734          return(0);
735   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines