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

Comparing ray/src/rt/pmapio.c (file contents):
Revision 2.9 by rschregle, Tue May 17 17:39:47 2016 UTC vs.
Revision 2.11 by rschregle, Thu Feb 8 19:55:02 2018 UTC

# Line 34 | Line 34 | void savePhotonMap (const PhotonMap *pmap, const char
34        return;
35     }
36        
37 <   if (photonRepTime) {
37 >   if (verbose) {
38        if (pmap -> numPrimary)
39 <         sprintf(errmsg, "Saving %s (%ld photons, %d primaries)...\n",
39 >         sprintf(errmsg, "Saving %s (%ld photons, %d primaries)\n",
40                   fname, pmap -> numPhotons, pmap -> numPrimary);
41 <      else sprintf(errmsg, "Saving %s (%ld photons)...\n", fname,
41 >      else sprintf(errmsg, "Saving %s (%ld photons)\n", fname,
42                     pmap -> numPhotons);
43                    
44        eputs(errmsg);
# Line 110 | Line 110 | void savePhotonMap (const PhotonMap *pmap, const char
110           PhotonPrimary *prim = pmap -> primaries + i;      
111  
112           putint(prim -> srcIdx, sizeof(prim -> srcIdx), file);
113 + #ifdef PMAP_PRIMARYDIR        
114           putint(prim -> dir, sizeof(prim -> dir), file);
115 + #endif        
116   #ifdef PMAP_PRIMARYPOS        
117           for (j = 0; j < 3; j++)
118              putflt(prim -> pos [j], file);
# Line 207 | Line 209 | PhotonMapType loadPhotonMap (PhotonMap *pmap, const ch
209           PhotonPrimary *prim = pmap -> primaries + i;
210          
211           prim -> srcIdx = getint(sizeof(prim -> srcIdx), file);
212 <        
212 > #ifdef PMAP_PRIMARYDIR        
213           prim -> dir = getint(sizeof(prim -> dir), file);
214 + #endif        
215   #ifdef PMAP_PRIMARYPOS            
216           for (j = 0; j < 3; j++)
217              prim -> pos [j] = getflt(file);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines