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

Comparing ray/src/gen/gensurf.c (file contents):
Revision 2.16 by greg, Sat Aug 21 11:54:06 2004 UTC vs.
Revision 2.20 by greg, Mon Aug 15 19:48:06 2011 UTC

# Line 34 | Line 34 | char  VNAME[] =        "valid";                /* valid vertex name */
34  
35   #define  pvect(p)       printf(vformat, (p)[0], (p)[1], (p)[2])
36  
37 < char  vformat[] = "%15.9g %15.9g %15.9g\n";
38 < char  tsargs[] = "4 surf_dx surf_dy surf_dz surf.cal\n";
37 > char  vformat[] = "%18.12g %18.12g %18.12g\n";
38 > char  tsargs[] = "4 surf_dx surf_dy surf_dz surf.cal";
39   char  texname[] = "Phong";
40  
41   int  smooth = 0;                /* apply smoothing? */
# Line 182 | Line 182 | char  *argv[];
182  
183   userror:
184          fprintf(stderr, "Usage: %s material name ", argv[0]);
185 <        fprintf(stderr, "x(s,t) y(s,t) z(s,t) m n [-s][-e expr][-f file]\n");
185 >        fprintf(stderr, "x(s,t) y(s,t) z(s,t) m n [-s][-o][-e expr][-f file]\n");
186          return 1;
187   }
188  
# Line 229 | Line 229 | loaddata(              /* load point data from file */
229                  size--;
230          }
231          if (size == (m+n+1)*pointsize) {        /* no border after all */
232 <                dp = (RREAL *)realloc((void *)datarec.data,
232 >                dp = (RREAL *)realloc(datarec.data,
233                                  m*n*pointsize*sizeof(RREAL));
234                  if (dp != NULL)
235                          datarec.data = dp;
# Line 382 | Line 382 | putsquare(             /* put out a square */
382          if (ok1 & ok2 && fdot(vc1,vc2) >= 1.0-FTINY*FTINY) {
383                  printf("\n%s ", modname);
384                  if (axis != -1) {
385 <                        printf("texfunc %s\n", texname);
386 <                        printf(tsargs);
385 >                        printf("texfunc %s\n%s\n", texname, tsargs);
386                          printf("0\n13\t%d\n", axis);
387                          pvect(norm[0]);
388                          pvect(norm[1]);
# Line 405 | Line 404 | putsquare(             /* put out a square */
404          if (ok1) {
405                  printf("\n%s ", modname);
406                  if (axis != -1) {
407 <                        printf("texfunc %s\n", texname);
409 <                        printf(tsargs);
407 >                        printf("texfunc %s\n%s\n", texname, tsargs);
408                          printf("0\n13\t%d\n", axis);
409                          pvect(norm[0]);
410                          pvect(norm[1]);
# Line 424 | Line 422 | putsquare(             /* put out a square */
422          if (ok2) {
423                  printf("\n%s ", modname);
424                  if (axis != -1) {
425 <                        printf("texfunc %s\n", texname);
428 <                        printf(tsargs);
425 >                        printf("texfunc %s\n%s\n", texname, tsargs);
426                          printf("0\n13\t%d\n", axis);
427                          pvect(norm[0]);
428                          pvect(norm[1]);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines