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

Comparing ray/src/cv/robjutil.c (file contents):
Revision 2.1 by greg, Mon Mar 30 18:28:35 2020 UTC vs.
Revision 2.2 by greg, Thu Apr 2 20:44:15 2020 UTC

# Line 28 | Line 28 | main(int argc, char *argv[])
28          int             save_mats = 1;
29          int             do_tex = 0;
30          int             do_norm = 0;
31 +        char            *xfm = NULL;
32          char            cbuf[256];
33          double          verteps = -1.;
34          int     i, n;
# Line 85 | Line 86 | main(int argc, char *argv[])
86                  case 'r':                       /* output to Radiance file? */
87                          radout = (argv[i][0] == '+');
88                          break;
89 +                case 'x':                       /* apply a transform */
90 +                        if (xfm != NULL) {
91 +                                fprintf(stderr, "%s: only one '-x' option allowed\n",
92 +                                                argv[0]);
93 +                                exit(1);
94 +                        }
95 +                        xfm = argv[++i];
96 +                        break;
97                  default:
98                          fprintf(stderr, "%s: unknown option: %s\n",
99                                          argv[0], argv[i]);
# Line 178 | Line 187 | main(int argc, char *argv[])
187                  sprintf(cbuf, "Removed %d duplicate faces", n);
188                  addComment(myScene, cbuf);
189          }
190 +        if (xfm != NULL) {
191 +                if (verbose)
192 +                        fputs("Applying transform...\n", stderr);
193 +                if (!xfmScene(myScene, xfm)) {
194 +                        fprintf(stderr, "%s: transform error\n", argv[0]);
195 +                        exit(1);
196 +                }
197 +                sprintf(cbuf, "Applied transform: %s", xfm);
198 +                addComment(myScene, cbuf);
199 +        }
200          if (verbose)
201                  fputs("Writing out scene...\n", stderr);
202  
# Line 201 | Line 220 | userr:
220          fprintf(stderr, "\t+/-t\t\t\t# keep/remove texture coordinates\n");
221          fprintf(stderr, "\t+/-n\t\t\t# keep/remove vertex normals\n");
222          fprintf(stderr, "\t-c epsilon\t\t# coalesce vertices within epsilon\n");
223 +        fprintf(stderr, "\t-x 'xf spec'\t# apply the quoted transform\n");
224          return(1);
225   }
226  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines