1 |
+ |
/* RCSid $Id$ */ |
2 |
+ |
|
3 |
|
/* |
4 |
< |
================================================================== |
4 |
> |
====================================================================== |
5 |
|
Photon map main header |
6 |
|
|
7 |
|
Roland Schregle (roland.schregle@{hslu.ch, gmail.com}) |
8 |
|
(c) Fraunhofer Institute for Solar Energy Systems, |
9 |
|
(c) Lucerne University of Applied Sciences and Arts, |
10 |
< |
supported by the Swiss National Science Foundation (SNSF, #147053) |
11 |
< |
================================================================== |
10 |
> |
supported by the Swiss National Science Foundation (SNSF, #147053) |
11 |
> |
====================================================================== |
12 |
|
|
13 |
|
$Id$ |
14 |
|
*/ |
17 |
|
#ifndef PMAP_H |
18 |
|
#define PMAP_H |
19 |
|
|
20 |
+ |
#ifndef NIX |
21 |
+ |
#if defined(_WIN32) || defined(_WIN64) |
22 |
+ |
#define NIX 0 |
23 |
+ |
#else |
24 |
+ |
#define NIX 1 |
25 |
+ |
#endif |
26 |
+ |
#endif |
27 |
+ |
|
28 |
|
#include "pmapparm.h" |
29 |
|
#include "pmapdata.h" |
30 |
|
|
31 |
|
|
32 |
|
#ifndef min |
33 |
< |
#define min(a, b) ((a) < (b) ? (a) : (b)) |
33 |
> |
#define min(a, b) ((a) < (b) ? (a) : (b)) |
34 |
|
#endif |
35 |
|
|
36 |
|
#ifndef max |
37 |
< |
#define max(a, b) ((a) > (b) ? (a) : (b)) |
37 |
> |
#define max(a, b) ((a) > (b) ? (a) : (b)) |
38 |
|
#endif |
39 |
|
|
40 |
< |
#define sqr(a) ((a) * (a)) |
40 |
> |
#define sqr(a) ((a) * (a)) |
41 |
|
|
42 |
|
/* Average over colour channels */ |
43 |
|
#define colorAvg(col) ((col [0] + col [1] + col [2]) / 3) |
65 |
|
void cleanUpPmaps (PhotonMap **pmaps); |
66 |
|
/* Trash all photon maps after processing is complete */ |
67 |
|
|
68 |
< |
void distribPhotons (PhotonMap **pmaps); |
68 |
> |
void distribPhotons (PhotonMap **pmaps, unsigned numProc); |
69 |
|
/* Emit photons from light sources and build photon maps for non-NULL |
70 |
|
* entries in photon map array */ |
71 |
|
|