1 |
+ |
/* RCSid $Id$ */ |
2 |
+ |
|
3 |
|
/* |
4 |
|
================================================================== |
5 |
|
Photon map main header |
22 |
|
|
23 |
|
|
24 |
|
#ifndef min |
25 |
< |
#define min(a, b) ((a) < (b) ? (a) : (b)) |
25 |
> |
#define min(a, b) ((a) < (b) ? (a) : (b)) |
26 |
|
#endif |
27 |
|
|
28 |
|
#ifndef max |
29 |
< |
#define max(a, b) ((a) > (b) ? (a) : (b)) |
29 |
> |
#define max(a, b) ((a) > (b) ? (a) : (b)) |
30 |
|
#endif |
31 |
|
|
32 |
< |
#define sqr(a) ((a) * (a)) |
32 |
> |
#define sqr(a) ((a) * (a)) |
33 |
|
|
34 |
|
/* Average over colour channels */ |
35 |
|
#define colorAvg(col) ((col [0] + col [1] + col [2]) / 3) |
57 |
|
void cleanUpPmaps (PhotonMap **pmaps); |
58 |
|
/* Trash all photon maps after processing is complete */ |
59 |
|
|
60 |
< |
void distribPhotons (PhotonMap **pmaps); |
60 |
> |
void distribPhotons (PhotonMap **pmaps, unsigned numProc); |
61 |
|
/* Emit photons from light sources and build photon maps for non-NULL |
62 |
|
* entries in photon map array */ |
63 |
|
|