1 |
+ |
#ifndef lint |
2 |
+ |
static const char RCSid[] = "$Id$"; |
3 |
+ |
#endif |
4 |
|
/* |
5 |
|
================================================================== |
6 |
|
Photon map interface to RADIANCE render options |
7 |
|
|
8 |
|
Roland Schregle (roland.schregle@{hslu.ch, gmail.com}) |
9 |
|
(c) Fraunhofer Institute for Solar Energy Systems, |
10 |
< |
Lucerne University of Applied Sciences & Arts |
10 |
> |
(c) Lucerne University of Applied Sciences and Arts, |
11 |
> |
supported by the Swiss National Science Foundation (SNSF, #147053) |
12 |
|
================================================================== |
13 |
|
|
14 |
|
$Id$ |
16 |
|
|
17 |
|
|
18 |
|
|
19 |
< |
#include <stdlib.h> |
19 |
> |
#include "ray.h" |
20 |
|
#include "pmapparm.h" |
17 |
– |
#include "rtio.h" |
18 |
– |
#include "rterror.h" |
21 |
|
|
22 |
|
|
23 |
|
|
36 |
|
case 'a': |
37 |
|
switch (av [0][2]) { |
38 |
|
case 'p': /* photon map */ |
39 |
+ |
/* Asking for photon map, ergo ambounce != 0 */ |
40 |
+ |
ambounce += (ambounce == 0); |
41 |
|
if (!check(3, "s")) { |
42 |
|
/* File -> assume bwidth = 1 or precomputed pmap */ |
43 |
|
if (++t >= NUM_PMAP_TYPES) |
75 |
|
} |
76 |
|
else return 2; |
77 |
|
|
78 |
< |
case 'm': /* max photon search radius coefficient */ |
79 |
< |
if (check(3, "f") || (maxDistCoeff = atof(av [1])) <= 0) |
78 |
> |
case 'm': /* Fixed max photon search radius */ |
79 |
> |
if (check(3, "f") || (maxDistFix = atof(av [1])) <= 0) |
80 |
|
error(USER, "invalid max photon search radius coefficient"); |
81 |
|
|
82 |
|
return 1; |
93 |
|
void printPmapDefaults () |
94 |
|
/* Print defaults for photon map render options */ |
95 |
|
{ |
96 |
< |
puts("-ap file [bwidth1 [bwidth2]]\t# photon map"); |
93 |
< |
printf("-am %.1f\t\t\t# max photon search radius coeff\n", maxDistCoeff); |
96 |
> |
printf("-am %.1f\t\t\t\t# max photon search radius\n", maxDistFix); |
97 |
|
} |