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.10 by rschregle, Wed Jul 29 18:54:20 2015 UTC

# Line 362 | Line 362 | void findPhotons (PhotonMap* pmap, const RAY* ray)
362           nearestNeighbours(pmap, pos, norm, 1);
363        }
364  
365 +      if (pmap -> maxDist < FTINY) {
366 +         sprintf(errmsg, "itsy bitsy teeny weeny photon search radius %e",
367 +                 sqrt(pmap -> maxDist));
368 +         error(WARNING, errmsg);
369 +      }
370 +
371        if (pmap -> squeueEnd < pmap -> squeueSize * pmap -> gatherTolerance) {
372           /* Short lookup; too few photons found */
373           if (pmap -> squeueEnd > PMAP_SHORT_LOOKUP_THRESH) {
# Line 392 | Line 398 | void findPhotons (PhotonMap* pmap, const RAY* ray)
398                 sprintf(errmsg,
399                         redo ? "restarting photon lookup with max radius %.1e"
400                              : "max photon lookup radius adjusted to %.1e",
401 <                       pmap -> maxDist0);
401 >                       sqrt(pmap -> maxDist0));
402                 error(WARNING, errmsg);
403   #endif
404              }
405   #ifdef PMAP_LOOKUP_REDO
406              else {
407                 sprintf(errmsg, "max photon lookup radius clamped to %.1e",
408 <                       pmap -> maxDist0);
408 >                       sqrt(pmap -> maxDist0));
409                 error(WARNING, errmsg);
410              }
411   #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines