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

Comparing ray/src/util/dctimestep.c (file contents):
Revision 2.35 by greg, Fri Sep 26 23:33:09 2014 UTC vs.
Revision 2.36 by greg, Tue Jul 14 16:08:28 2015 UTC

# Line 182 | Line 182 | main(int argc, char *argv[])
182                  goto userr;
183  
184          if (argc-a > 2) {                       /* VTDs expression */
185 <                CMATRIX *smtx, *Dmat, *Tmat, *imtx;
185 >                CMATRIX         *smtx, *Dmat, *Tmat, *imtx;
186 >                const char      *ccp;
187                                                  /* get sky vector/matrix */
188                  smtx = cm_load(argv[a+3], 0, nsteps, skyfmt);
189                  nsteps = smtx->ncols;
190                                                  /* load BSDF */
191 <                Tmat = cm_loadBTDF(argv[a+1]);
191 >                if (argv[a+1][0] != '!' &&
192 >                                (ccp = strrchr(argv[a+1], '.')) != NULL &&
193 >                                !strcasecmp(ccp+1, "XML"))
194 >                        Tmat = cm_loadBTDF(argv[a+1]);
195 >                else
196 >                        Tmat = cm_load(argv[a+1], 0, 0, DTfromHeader);
197                                                  /* load Daylight matrix */
198 <                Dmat = cm_load(argv[a+2], Tmat==NULL ? 0 : Tmat->ncols,
198 >                Dmat = cm_load(argv[a+2], Tmat->ncols,
199                                          smtx->nrows, DTfromHeader);
200                                                  /* multiply vector through */
201                  imtx = cm_multiply(Dmat, smtx);
# Line 319 | Line 325 | main(int argc, char *argv[])
325   userr:
326          fprintf(stderr, "Usage: %s [-n nsteps][-o ospec][-i{f|d|h}][-o{f|d}] DCspec [skyf]\n",
327                                  progname);
328 <        fprintf(stderr, "   or: %s [-n nsteps][-o ospec][-i{f|d|h}][-o{f|d}] Vspec Tbsdf.xml Dmat.dat [skyf]\n",
328 >        fprintf(stderr, "   or: %s [-n nsteps][-o ospec][-i{f|d|h}][-o{f|d}] Vspec Tbsdf Dmat.dat [skyf]\n",
329                                  progname);
330          return(1);
331   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines