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.4 by greg, Mon Aug 2 14:22:59 1993 UTC vs.
Revision 2.5 by greg, Sat Feb 22 02:07:23 2003 UTC

# Line 1 | Line 1
1 /* Copyright (c) 1986 Regents of the University of California */
2
1   #ifndef lint
2 < static char SCCSid[] = "$SunId$ LBL";
2 > static const char       RCSid[] = "$Id$";
3   #endif
6
4   /*
5   *  genbox.c - generate a parallelepiped.
6   *
# Line 12 | Line 9 | static char SCCSid[] = "$SunId$ LBL";
9  
10   #include  <stdio.h>
11  
12 + #include <stdlib.h>
13 +
14   #include  <math.h>
15  
16  
18 #ifdef  DCL_ATOF
19 extern double  atof();
20 #endif
21
17   char  let[]="0123456789._ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
18  
19   char  *cmtype;          /* ppd material type */
# Line 29 | Line 24 | double  size[3];       /* ppd size */
24  
25   double  bevel = 0.0;    /* bevel amount */
26  
27 < int  round = 0;         /* boolean true for round edges */
27 > int  rounde = 0;                /* boolean true for rounde edges */
28  
29   int  reverse = 0;       /* boolean true for reversed normals */
30  
# Line 54 | Line 49 | char  **argv;
49                          goto userr;
50                  switch (argv[i][1]) {
51                  case 'r':
52 <                        round = 1;
52 >                        rounde = 1;
53                          /* fall through */
54                  case 'b':
55                          bevel = atof(argv[++i]);
# Line 78 | Line 73 | char  **argv;
73                  side(065, 061, 063, 067);
74                  side(036, 034, 035, 037);
75          }
76 <        if (bevel > 0.0 && !round) {
76 >        if (bevel > 0.0 && !rounde) {
77                                          /* bevel faces */
78                  side(031, 051, 050, 030);
79                  side(060, 062, 032, 030);
# Line 102 | Line 97 | char  **argv;
97                  corner(053, 063, 033);
98                  corner(037, 067, 057);
99          }
100 <        if (bevel > 0.0 && round) {
101 <                                        /* round edges */
100 >        if (bevel > 0.0 && rounde) {
101 >                                        /* rounde edges */
102                  cylinder(070, 071);
103                  cylinder(070, 074);
104                  cylinder(070, 072);
# Line 116 | Line 111 | char  **argv;
111                  cylinder(076, 072);
112                  cylinder(076, 074);
113                  cylinder(076, 077);
114 <                                        /* round corners */
114 >                                        /* rounde corners */
115                  sphere(070);
116                  sphere(071);
117                  sphere(072);
# Line 139 | Line 134 | char  **argv;
134   userr:
135          fprintf(stderr, "Usage: %s ", argv[0]);
136          fprintf(stderr, "material name xsize ysize zsize ");
137 <        fprintf(stderr, "[-i] [-b bevel | -r round]\n");
137 >        fprintf(stderr, "[-i] [-b bevel | -r rounde]\n");
138          exit(1);
139   }
140  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines