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

Comparing ray/src/rt/pmapkdt.c (file contents):
Revision 1.1 by rschregle, Wed May 18 08:22:45 2016 UTC vs.
Revision 1.2 by rschregle, Mon Aug 14 21:12:10 2017 UTC

# Line 1 | Line 1
1   /*
2 <   ==================================================================
2 >   ======================================================================
3     In-core kd-tree for photon map
4  
5     Roland Schregle (roland.schregle@{hslu.ch, gmail.com})
6     (c) Fraunhofer Institute for Solar Energy Systems,
7     (c) Lucerne University of Applied Sciences and Arts,
8 <   supported by the Swiss National Science Foundation (SNSF, #147053)
9 <   ==================================================================
8 >       supported by the Swiss National Science Foundation (SNSF, #147053)
9 >   ======================================================================
10    
11     $Id$
12   */
13  
14  
15 < #ifdef PMAP_OOC
16 <   /* Checked in pmapdata.h */
17 <   #undef PMAP_OOC
18 < #endif
15 >
16   #include "pmapdata.h"   /* Includes pmapkdt.h */
17   #include "source.h"
18  
# Line 201 | Line 198 | void kdT_BuildPhotonMap (struct PhotonMap *pmap)
198        error(SYSTEM, "failed in-core heap allocation in kdT_BuildPhotonMap");
199      
200     rewind(pmap -> heap);
201 <   if (fread(nodes, sizeof(Photon), pmap -> numPhotons, pmap -> heap) !=
201 >   i = fread(nodes, sizeof(Photon), pmap -> numPhotons, pmap -> heap);
202 >   if (i !=
203         pmap -> numPhotons)
204        error(SYSTEM, "failed loading photon heap in kdT_BuildPhotonMap");
205        

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines