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

Comparing ray/src/rt/pmap.c (file contents):
Revision 2.3 by rschregle, Wed Apr 22 20:28:16 2015 UTC vs.
Revision 2.5 by rschregle, Fri May 8 13:20:23 2015 UTC

# Line 4 | Line 4
4  
5     Roland Schregle (roland.schregle@{hslu.ch, gmail.com})
6     (c) Fraunhofer Institute for Solar Energy Systems,
7 <       Lucerne University of Applied Sciences & Arts  
7 >   (c) Lucerne University of Applied Sciences and Arts,
8 >   supported by the Swiss National Science Foundation (SNSF, #147053)
9     ==================================================================
10    
11     $Id$
# Line 64 | Line 65 | void loadPmaps (PhotonMap **pmaps, const PhotonMapPara
65     for (t = 0; t < NUM_PMAP_TYPES; t++)
66        if (setPmapParam(&pm, parm + t)) {        
67           /* Check if photon map newer than octree */
68 <         if (!stat(pm -> fileName, &pmstat) && !stat(octname, &octstat) &&
68 >         if (pm -> fileName && octname &&
69 >             !stat(pm -> fileName, &pmstat) && !stat(octname, &octstat) &&
70               octstat.st_mtime > pmstat.st_mtime) {
71              sprintf(errmsg, "photon map in file %s may be stale",
72                      pm -> fileName);
# Line 204 | Line 206 | void tracePhoton (RAY *ray)
206     OBJREC* mat;
207  
208     if (ray -> rlvl > photonMaxBounce) {
209 + #ifdef PMAP_RUNAWAY_WARN  
210        error(WARNING, "runaway photon!");
211 + #endif      
212        return;
213     }
214 <  
214 >  
215     if (colorAvg(ray -> cext) > FTINY && !photonParticipate(ray))
216        return;
217        

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines