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

Comparing ray/src/rt/ambient.c (file contents):
Revision 2.94 by greg, Tue Feb 24 19:39:26 2015 UTC vs.
Revision 2.100 by greg, Thu Mar 3 22:47:21 2016 UTC

# Line 196 | Line 196 | setambient(void)                               /* initialize calculation */
196                  sprintf(errmsg, "cannot open ambient file \"%s\"", ambfile);
197                  error(SYSTEM, errmsg);
198          }
199 #ifdef getc_unlocked
200        flockfile(ambfp);                       /* application-level lock */
201 #endif
199   #ifdef  F_SETLKW
200          aflock(F_UNLCK);                        /* release file */
201   #endif
# Line 219 | Line 216 | ambdone(void)                  /* close ambient file and free memory
216                  lastpos = -1;
217          }
218                                          /* free ambient tree */
219 <        unloadatree(&atrunk, &avfree);
219 >        unloadatree(&atrunk, avfree);
220                                          /* reset state variables */
221          avsum = 0.;
222          navsum = 0;
# Line 667 | Line 664 | multambient(           /* compute ambient component & multiply
664  
665          /* PMAP: Factor in ambient from global photon map (if enabled) and return
666           * as all ambient components accounted for */
667 <        if (ambGlobalPmap(aval, r, rdepth))
667 >        if (ambPmap(aval, r, rdepth))
668                  return;
669  
670          /* PMAP: Otherwise factor in ambient from caustic photon map
671 <         * (ambCausticPmap() returns zero if caustic photons disabled) and
671 >         * (ambPmapCaustic() returns zero if caustic photons disabled) and
672           * continue with RADIANCE ambient calculation */
673          copycolor(caustic, aval);
674 <        ambCausticPmap(caustic, r, rdepth);
674 >        ambPmapCaustic(caustic, r, rdepth);
675          
676          if (ambdiv <= 0)                        /* no ambient calculation */
677                  goto dumbamb;
# Line 1229 | Line 1226 | sortambvals(                   /* resort ambient values */
1226                          oldatrunk = atrunk;
1227                          atrunk.alist = NULL;
1228                          atrunk.kid = NULL;
1229 <                        unloadatree(&oldatrunk, &avinsert);
1229 >                        unloadatree(&oldatrunk, avinsert);
1230                  }
1231          } else {                        /* sort memory by last access time */
1232                  /*
# Line 1246 | Line 1243 | sortambvals(                   /* resort ambient values */
1243                  eputs(errmsg);
1244   #endif
1245                  i_avlist = 0;
1246 <                unloadatree(&atrunk, &av2list); /* empty current tree */
1246 >                unloadatree(&atrunk, av2list);  /* empty current tree */
1247   #ifdef DEBUG
1248                  if (i_avlist < nambvals)
1249                          error(CONSISTENCY, "missing ambient values in sortambvals");

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines