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

Comparing ray/src/gen/genbox.c (file contents):
Revision 2.12 by greg, Fri Apr 9 18:52:57 2021 UTC vs.
Revision 2.13 by greg, Thu Apr 15 23:51:04 2021 UTC

# Line 274 | Line 274 | sphere(int v0)                                 /* generate a rounded corner */
274   int
275   main(int argc, char *argv[])
276   {
277 +        int  smooth = 0;
278          int  nsegs = 1;
279          int  objout = 0;
280          int  i;
# Line 301 | Line 302 | main(int argc, char *argv[])
302                  case 'i':                       /* invert surface normals */
303                          rev = 1;
304                          break;
305 +                case 's':                       /* normal smoothing? */
306 +                        smooth = 1;
307 +                        break;
308                  case 'r':                       /* rounded edges/corners */
309                          rounde = 1;
310                          /* fall through */
# Line 397 | Line 401 | main(int argc, char *argv[])
401                  side(6, 4, 5, 7);
402          }
403          if (obj != NULL) {                      /* need to write output? */
404 +                if (!smooth)
405 +                        removeNormals(obj, 0, 0);
406                  if (objout) {
407                          if (rounde)             /* joins corners to edges */
408                                  coalesceVertices(obj, 2.*FTINY);
# Line 410 | Line 416 | main(int argc, char *argv[])
416   userr:
417          fprintf(stderr, "Usage: %s ", argv[0]);
418          fprintf(stderr, "material name xsize ysize zsize ");
419 <        fprintf(stderr, "[-i] [-b bevel | -r round [-n nsegs]] [-o]\n");
419 >        fprintf(stderr, "[-i] [-b bevel | -r round [-n nsegs][-s]] [-o]\n");
420          return(1);
421   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines