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

Comparing ray/src/util/rfluxmtx.c (file contents):
Revision 2.19 by greg, Thu Dec 4 05:26:28 2014 UTC vs.
Revision 2.23 by greg, Wed Feb 18 06:18:38 2015 UTC

# Line 362 | Line 362 | parse_params(PARAMS *p, char *pargs)
362                  case ' ':
363                  case '\t':
364                  case '\r':
365                        continue;
365                  case '\n':
366 +                        continue;
367                  case '\0':
368                          return(nparams);
369                  default:
# Line 417 | Line 417 | finish_receiver(void)
417          }
418                                          /* determine sample type/bin */
419          if (tolower(curparams.hemis[0]) == 'u' | curparams.hemis[0] == '1') {
420 <                binv = "0";             /* uniform sampling -- one bin */
420 >                sprintf(sbuf, "if(-Dx*%g-Dy*%g-Dz*%g,0,-1)",
421 >                        curparams.nrm[0], curparams.nrm[1], curparams.nrm[2]);
422 >                binv = savqstr(sbuf);
423 >                nbins = "1";            /* uniform sampling -- one bin */
424                  uniform = 1;
425          } else if (tolower(curparams.hemis[0]) == 's' &&
426                                  tolower(curparams.hemis[1]) == 'c') {
# Line 1347 | Line 1350 | main(int argc, char *argv[])
1350   #ifdef getc_unlocked
1351          flockfile(rcfp);
1352   #endif
1353 <        if (verbose) {
1353 >        if (verbose > 0) {
1354                  fprintf(stderr, "%s: sampling %d directions", progname, nsbins);
1355                  if (curparams.nsurfs > 1)
1356                          fprintf(stderr, " (%d elements)\n", curparams.nsurfs);
# Line 1357 | Line 1360 | main(int argc, char *argv[])
1360          for (i = 0; i < nsbins; i++)    /* send rcontrib ray samples */
1361                  if (!(*curparams.sample_basis)(&curparams, i, rcfp))
1362                          return(1);
1363 <        return(pclose(rcfp) == 0);      /* all finished! */
1363 >        return(pclose(rcfp) < 0);       /* all finished! */
1364   userr:
1365          if (a < argc-2)
1366                  fprintf(stderr, "%s: unsupported option '%s'", progname, argv[a]);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines