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

Comparing ray/src/rt/pmapdata.c (file contents):
Revision 2.9 by rschregle, Wed May 27 19:15:27 2015 UTC vs.
Revision 2.13 by rschregle, Wed Sep 9 16:08:46 2015 UTC

# Line 1 | Line 1
1 + #ifndef lint
2 + static const char RCSid[] = "$Id$";
3 + #endif
4   /*
5     ==================================================================
6     Photon map data structures and kd-tree handling
# Line 8 | Line 11
11     supported by the Swiss National Science Foundation (SNSF, #147053)
12     ==================================================================  
13    
11   $Id$
14   */
15  
16  
# Line 362 | Line 364 | void findPhotons (PhotonMap* pmap, const RAY* ray)
364           nearestNeighbours(pmap, pos, norm, 1);
365        }
366  
367 + #ifdef PMAP_ITSYBITSY
368 +      if (pmap -> maxDist < FTINY) {
369 +         sprintf(errmsg, "itsy bitsy teeny weeny photon search radius %e",
370 +                 sqrt(pmap -> maxDist));
371 +         error(WARNING, errmsg);
372 +      }
373 + #endif
374 +
375        if (pmap -> squeueEnd < pmap -> squeueSize * pmap -> gatherTolerance) {
376           /* Short lookup; too few photons found */
377           if (pmap -> squeueEnd > PMAP_SHORT_LOOKUP_THRESH) {
# Line 392 | Line 402 | void findPhotons (PhotonMap* pmap, const RAY* ray)
402                 sprintf(errmsg,
403                         redo ? "restarting photon lookup with max radius %.1e"
404                              : "max photon lookup radius adjusted to %.1e",
405 <                       pmap -> maxDist0);
405 >                       sqrt(pmap -> maxDist0));
406                 error(WARNING, errmsg);
407   #endif
408              }
409   #ifdef PMAP_LOOKUP_REDO
410              else {
411                 sprintf(errmsg, "max photon lookup radius clamped to %.1e",
412 <                       pmap -> maxDist0);
412 >                       sqrt(pmap -> maxDist0));
413                 error(WARNING, errmsg);
414              }
415   #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines