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