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.55 by greg, Wed Nov 15 18:02:53 2023 UTC vs.
Revision 2.60 by greg, Tue Jun 3 21:31:51 2025 UTC

# Line 22 | Line 22 | static const char RCSid[] = "$Id$";
22   #define MAXRCARG        10000
23   #endif
24  
25 char            *progname;              /* global argv[0] */
26
25   int             verbose = 0;            /* verbose mode (< 0 no warnings) */
26  
27   char            *rcarg[MAXRCARG+1] = {"rcontrib", "-fo+"};
# Line 41 | Line 39 | char           *shirchiufn = "disk2square.cal";
39   char            *kfullfn = "klems_full.cal";
40   char            *khalffn = "klems_half.cal";
41   char            *kquarterfn = "klems_quarter.cal";
42 + char            *ciefn = "cieskyscan.cal";
43  
44                                          /* string indicating parameters */
45   const char      PARAMSTART[] = "@rfluxmtx";
# Line 499 | Line 498 | finish_receiver(void)
498                  calfn = kquarterfn; kquarterfn = NULL;
499                  binf = "kqbin";
500                  nbins = "Nkqbins";
501 +        } else if (!strcasecmp(curparams.hemis, "cie")) {
502 +                calfn = ciefn; ciefn = NULL;
503 +                sprintf(sbuf, "rNx=%g,rNy=%g,rNz=%g,Ux=%g,Uy=%g,Uz=%g,RHS=%c1",
504 +                        curparams.nrm[0], curparams.nrm[1], curparams.nrm[2],
505 +                        curparams.vup[0], curparams.vup[1], curparams.vup[2],
506 +                        curparams.sign);
507 +                binv = "cbin";
508 +                nbins = "Ncbins";
509          } else {
510                  fprintf(stderr, "%s: unrecognized hemisphere sampling: h=%s\n",
511                                  progname, curparams.hemis);
# Line 508 | Line 515 | finish_receiver(void)
515                  sprintf(sbuf, "RHS=%c1", curparams.sign);
516                  params = savqstr(sbuf);
517          }
518 <        if (!uniform & (curparams.slist->styp == ST_SOURCE)) {
518 >        if (!uniform) {
519                  SURF    *sp;
520                  for (sp = curparams.slist; sp != NULL; sp = sp->next)
521 <                        if (fabs(sp->area - PI) > 1e-3) {
521 >                        if (sp->styp == ST_SOURCE && fabs(sp->area - PI) > 1e-3) {
522                                  fprintf(stderr, "%s: source '%s' must be 180-degrees\n",
523                                                  progname, sp->sname);
524                                  exit(1);
# Line 1095 | Line 1102 | add_recv_object(FILE *fp)
1102          }
1103                                          /* is it a new receiver? */
1104          if ((st = surf_type(otype)) != ST_NONE) {
1098                if (curparams.slist != NULL && (st == ST_SOURCE) ^
1099                                (curparams.slist->styp == ST_SOURCE)) {
1100                        fputs(progname, stderr);
1101                        fputs(": cannot mix source/non-source receivers!\n", stderr);
1102                        return(-1);
1103                }
1105                  if (strcmp(thismod, curmod)) {
1106                          if (curmod[0]) {        /* output last receiver? */
1107                                  finish_receiver();
# Line 1236 | Line 1237 | main(int argc, char *argv[])
1237          FILE    *rcfp;
1238          int     nsbins;
1239          int     a, i;
1240 +                                        /* set global progname */
1241 +        fixargv0(argv[0]);
1242                                          /* screen rcontrib options */
1240        progname = argv[0];
1243          for (a = 1; a < argc-2; a++) {
1244                  int     na;
1245                                          /* check for argument expansion */
# Line 1296 | Line 1298 | main(int argc, char *argv[])
1298                                  if (sampcnt <= 0)
1299                                          goto userr;
1300                                  na = 0;         /* we re-add this later */
1301 <                                break;
1301 >                                continue;
1302                          }
1303 <                        continue;
1303 >                        break;
1304                  case 'I':               /* only for pass-through mode */
1305                  case 'i':
1306                          iropt = argv[a];

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines