1 |
+ |
/* RCSid $Id$ */ |
2 |
|
/* |
3 |
|
================================================================== |
4 |
|
Photon map main header |
5 |
|
|
6 |
|
Roland Schregle (roland.schregle@{hslu.ch, gmail.com}) |
7 |
|
(c) Fraunhofer Institute for Solar Energy Systems, |
8 |
< |
Lucerne University of Applied Sciences & Arts |
8 |
> |
(c) Lucerne University of Applied Sciences and Arts, |
9 |
> |
supported by the Swiss National Science Foundation (SNSF, #147053) |
10 |
|
================================================================== |
11 |
|
|
10 |
– |
$Id$ |
12 |
|
*/ |
13 |
|
|
14 |
|
|
19 |
|
#include "pmapdata.h" |
20 |
|
|
21 |
|
|
22 |
< |
|
23 |
< |
#define min(a, b) ((a) < (b) ? (a) : (b)) |
24 |
< |
#define max(a, b) ((a) > (b) ? (a) : (b)) |
22 |
> |
#ifndef min |
23 |
> |
#define min(a, b) ((a) < (b) ? (a) : (b)) |
24 |
> |
#endif |
25 |
> |
|
26 |
> |
#ifndef max |
27 |
> |
#define max(a, b) ((a) > (b) ? (a) : (b)) |
28 |
> |
#endif |
29 |
> |
|
30 |
|
#define sqr(a) ((a) * (a)) |
31 |
|
|
32 |
|
/* Average over colour channels */ |
34 |
|
|
35 |
|
/* Macros to test for enabled photon maps */ |
36 |
|
#define photonMapping (globalPmap || preCompPmap || \ |
37 |
< |
causticPmap ||contribPmap) |
38 |
< |
#define causticPhotonMapping (causticPmap) |
39 |
< |
#define directPhotonMapping (directPmap) |
40 |
< |
#define volumePhotonMapping (volumePmap) |
37 |
> |
causticPmap || contribPmap) |
38 |
> |
#define causticPhotonMapping (causticPmap != NULL) |
39 |
> |
#define directPhotonMapping (directPmap != NULL) |
40 |
> |
#define volumePhotonMapping (volumePmap != NULL) |
41 |
|
#define contribPhotonMapping (contribPmap && contribPmap -> srcContrib) |
42 |
|
|
43 |
|
|