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 |
|
|
12 |
|
$Id$ |
20 |
|
#include "pmapdata.h" |
21 |
|
|
22 |
|
|
23 |
< |
|
24 |
< |
#define min(a, b) ((a) < (b) ? (a) : (b)) |
25 |
< |
#define max(a, b) ((a) > (b) ? (a) : (b)) |
23 |
> |
#ifndef min |
24 |
> |
#define min(a, b) ((a) < (b) ? (a) : (b)) |
25 |
> |
#endif |
26 |
> |
|
27 |
> |
#ifndef max |
28 |
> |
#define max(a, b) ((a) > (b) ? (a) : (b)) |
29 |
> |
#endif |
30 |
> |
|
31 |
|
#define sqr(a) ((a) * (a)) |
32 |
|
|
33 |
|
/* Average over colour channels */ |
35 |
|
|
36 |
|
/* Macros to test for enabled photon maps */ |
37 |
|
#define photonMapping (globalPmap || preCompPmap || \ |
38 |
< |
causticPmap ||contribPmap) |
39 |
< |
#define causticPhotonMapping (causticPmap) |
40 |
< |
#define directPhotonMapping (directPmap) |
41 |
< |
#define volumePhotonMapping (volumePmap) |
38 |
> |
causticPmap || contribPmap) |
39 |
> |
#define causticPhotonMapping (causticPmap != NULL) |
40 |
> |
#define directPhotonMapping (directPmap != NULL) |
41 |
> |
#define volumePhotonMapping (volumePmap != NULL) |
42 |
|
#define contribPhotonMapping (contribPmap && contribPmap -> srcContrib) |
43 |
|
|
44 |
|
|