ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/src/rt/rxfluxmtx.cpp
(Generate patch)

Comparing src/rt/rxfluxmtx.cpp (file contents):
Revision 2.6 by greg, Fri Oct 24 18:37:05 2025 UTC vs.
Revision 2.8 by greg, Fri Nov 14 23:51:42 2025 UTC

# Line 1344 | Line 1344 | main(int argc, char *argv[])
1344          char            *outfn = NULL;
1345          FVECT           *rayarr = NULL;
1346          const char      *sendfn = "";
1347 +        double          binjitter = 0;
1348          PARAMS          sendparams;
1349          int             rval;
1350          int             a, i;
# Line 1384 | Line 1385 | main(int argc, char *argv[])
1385                  case 'W':                       /* verbose mode */
1386                          check_bool(2,verby);
1387                          break;
1388 +                case 'b':                       /* bin jitter? */
1389 +                        if (argv[a][2] != 'j')
1390 +                                goto userr;
1391 +                        check(3,"f");
1392 +                        binjitter = atof(argv[++a]);
1393 +                        break;
1394                  case 'v':                       // view file
1395                          if (argv[a][2] != 'f')
1396                                  goto userr;
# Line 1576 | Line 1583 | main(int argc, char *argv[])
1583          if (load_scene(argv[a], add_recv_object) < 0)
1584                  quit(1);
1585          finish_receiver();              // makes final AddModifier() call
1586 +        if (binjitter > FTINY)          // global bin jitter?
1587 +                varset(const_cast<char *>("JTR"), '=', binjitter);
1588                                          // prepare output files
1589          if (recover) {
1590                  if (force_open) {
# Line 1627 | Line 1636 | main(int argc, char *argv[])
1636                  i /= myRCmanager.xres;
1637                  int     xstart = myRCmanager.GetRowCount() - i*myRCmanager.xres;
1638                  i = myRCmanager.yres - i;
1639 <                while (i--)             // compute pixel rows from yres down
1640 <                        for (int x = xstart; x < myRCmanager.xres; xstart = 0, x++) {
1639 >                while (i--) {           // compute pixel rows from top down
1640 >                        for (int x = xstart; x < myRCmanager.xres; x++) {
1641                                  report_progress();
1642                                  if (!viewRayBundle(rayarr, x, i))
1643                                          quit(1);
1644                                  if (myRCmanager.ComputeRecord(rayarr) != myRCmanager.accum)
1645                                          error(USER, "failed call to ComputeRecord()");
1646                          }
1647 +                        xstart = 0;     // all rows after first start at x=0
1648 +                }
1649          } else if (sendfn == NULL) {    // pass-through mode?
1650   #ifdef getc_unlocked
1651                  flockfile(stdin);
# Line 1646 | Line 1657 | main(int argc, char *argv[])
1657                                  error(SYSTEM, errmsg);
1658                          }
1659                  if (verby) {
1660 <                        sprintf(errmsg, "computing %d rows in %d matrices\n",
1661 <                                        myRCmanager.GetRowMax()-i, nout);
1660 >                        sprintf(errmsg, "computing %d%s rows in %d matrices\n",
1661 >                                        myRCmanager.GetRowMax()-i, i ? " remaining" : "", nout);
1662                          if (myRCmanager.accum > 1)
1663                                  sprintf(errmsg+strlen(errmsg)-1, " with %d samples/row\n",
1664                                                  myRCmanager.accum);
# Line 1666 | Line 1677 | main(int argc, char *argv[])
1677          } else {                        // else surface-sampling mode
1678                  i = myRCmanager.GetRowCount();
1679                  if (verby) {
1680 <                        sprintf(errmsg, "sampling %d directions in %d matrices with %d samples/direction\n",
1681 <                                        myRCmanager.yres-i, nout, myRCmanager.accum);
1680 >                        sprintf(errmsg, "sampling %d%s directions in %d matrices with %d samples/direction\n",
1681 >                                        myRCmanager.yres-i, i ? " remaining" : "",
1682 >                                        nout, myRCmanager.accum);
1683                          if (sendparams.nsurfs > 1)
1684                                  sprintf(errmsg+strlen(errmsg)-1, " (%d surface elements)\n", sendparams.nsurfs);
1685                          eputs(errmsg);
# Line 1684 | Line 1696 | main(int argc, char *argv[])
1696          delete [] rayarr;
1697          myRCmanager.FlushQueue();
1698          report_progress((report_intvl > 0) | verby);
1699 <        quit(0);                        /* waits on children */
1699 >        quit(0);                        /* waits on any children */
1700   userr:
1701          if (a < argc && argv[a][0] == '-')
1702                  fprintf(stderr, "%s: unsupported/misplaced option '%s'\n", progname, argv[a]);
1703 <        fprintf(stderr, "Usage: %s [-W] [rcontrib options] { sender.rad | view | - } receiver.rad [-i system.oct] [system.rad ..]\n",
1703 >        fprintf(stderr, "Usage: %s [-W][-bj frac] [rcontrib options] { sender.rad | view | - } receiver.rad [-i system.oct] [system.rad ..]\n",
1704                                  progname);
1705          quit(1);
1706   }

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)