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

Comparing ray/src/cv/bsdfinterp.c (file contents):
Revision 2.1 by greg, Fri Oct 19 04:14:29 2012 UTC vs.
Revision 2.2 by greg, Sat Oct 20 07:02:00 2012 UTC

# Line 329 | Line 329 | e_advect_rbf(const MIGRATION *mig, const FVECT invec)
329          n = 0;                                  /* count migrating particles */
330          for (i = 0; i < mtx_nrows(mig); i++)
331              for (j = 0; j < mtx_ncols(mig); j++)
332 <                n += (mig->mtx[mtx_ndx(mig,i,j)] > FTINY);
332 >                n += (mtx_coef(mig,i,j) > FTINY);
333   #ifdef DEBUG
334          fprintf(stderr, "Input RBFs have %d, %d nodes -> output has %d\n",
335                          mig->rbfv[0]->nrbf, mig->rbfv[1]->nrbf, n);
# Line 350 | Line 350 | e_advect_rbf(const MIGRATION *mig, const FVECT invec)
350              float               mv;
351              ovec_from_pos(v0, rbf0i->gx, rbf0i->gy);
352              for (j = 0; j < mtx_ncols(mig); j++)
353 <                if ((mv = mig->mtx[mtx_ndx(mig,i,j)]) > FTINY) {
353 >                if ((mv = mtx_coef(mig,i,j)) > FTINY) {
354                          const RBFVAL    *rbf1j = &mig->rbfv[1]->rbfa[j];
355                          double          rad1 = R2ANG(rbf1j->crad);
356                          FVECT           v;
# Line 418 | Line 418 | advect_rbf(const FVECT invec)
418          n = 0;                                  /* count migrating particles */
419          for (i = 0; i < mtx_nrows(miga[0]); i++)
420              for (j = 0; j < mtx_ncols(miga[0]); j++)
421 <                for (k = (miga[0]->mtx[mtx_ndx(miga[0],i,j)] > FTINY) *
421 >                for (k = (mtx_coef(miga[0],i,j) > FTINY) *
422                                          mtx_ncols(miga[2]); k--; )
423 <                        n += (miga[2]->mtx[mtx_ndx(miga[2],i,k)] > FTINY &&
424 <                                miga[1]->mtx[mtx_ndx(miga[1],j,k)] > FTINY);
423 >                        n += (mtx_coef(miga[2],i,k) > FTINY &&
424 >                                mtx_coef(miga[1],j,k) > FTINY);
425   #ifdef DEBUG
426          fprintf(stderr, "Input RBFs have %d, %d, %d nodes -> output has %d\n",
427                          miga[0]->rbfv[0]->nrbf, miga[0]->rbfv[1]->nrbf,
# Line 446 | Line 446 | advect_rbf(const FVECT invec)
446              const double        rad0i = R2ANG(rbf0i->crad);
447              ovec_from_pos(v0, rbf0i->gx, rbf0i->gy);
448              for (j = 0; j < mtx_ncols(miga[0]); j++) {
449 <                const float     ma = miga[0]->mtx[mtx_ndx(miga[0],i,j)];
449 >                const float     ma = mtx_coef(miga[0],i,j);
450                  const RBFVAL    *rbf1j;
451                  double          rad1j, srad2;
452                  if (ma <= FTINY)
# Line 457 | Line 457 | advect_rbf(const FVECT invec)
457                  ovec_from_pos(v1, rbf1j->gx, rbf1j->gy);
458                  geodesic(v1, v0, v1, s, GEOD_REL);
459                  for (k = 0; k < mtx_ncols(miga[2]); k++) {
460 <                    float               mb = miga[1]->mtx[mtx_ndx(miga[1],j,k)];
461 <                    float               mc = miga[2]->mtx[mtx_ndx(miga[2],i,k)];
460 >                    float               mb = mtx_coef(miga[1],j,k);
461 >                    float               mc = mtx_coef(miga[2],i,k);
462                      const RBFVAL        *rbf2k;
463                      double              rad2k;
464                      FVECT               vout;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines