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.11 by greg, Tue Aug 18 18:45:55 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 362 | Line 365 | void findPhotons (PhotonMap* pmap, const RAY* ray)
365           nearestNeighbours(pmap, pos, norm, 1);
366        }
367  
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 +
374        if (pmap -> squeueEnd < pmap -> squeueSize * pmap -> gatherTolerance) {
375           /* Short lookup; too few photons found */
376           if (pmap -> squeueEnd > PMAP_SHORT_LOOKUP_THRESH) {
# Line 392 | Line 401 | void findPhotons (PhotonMap* pmap, const RAY* ray)
401                 sprintf(errmsg,
402                         redo ? "restarting photon lookup with max radius %.1e"
403                              : "max photon lookup radius adjusted to %.1e",
404 <                       pmap -> maxDist0);
404 >                       sqrt(pmap -> maxDist0));
405                 error(WARNING, errmsg);
406   #endif
407              }
408   #ifdef PMAP_LOOKUP_REDO
409              else {
410                 sprintf(errmsg, "max photon lookup radius clamped to %.1e",
411 <                       pmap -> maxDist0);
411 >                       sqrt(pmap -> maxDist0));
412                 error(WARNING, errmsg);
413              }
414   #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines