ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/rt/pmap.h
(Generate patch)

Comparing ray/src/rt/pmap.h (file contents):
Revision 2.2 by greg, Tue Apr 21 19:16:51 2015 UTC vs.
Revision 2.7 by rschregle, Tue May 17 17:39:47 2016 UTC

# Line 1 | Line 1
1 + /* RCSid $Id$ */
2 +
3   /*
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 <       Lucerne University of Applied Sciences & Arts  
9 >   (c) Lucerne University of Applied Sciences and Arts,
10 >   supported by the Swiss National Science Foundation (SNSF, #147053)
11     ==================================================================
12    
13     $Id$
# Line 19 | Line 22
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)
36  
37     /* Macros to test for enabled photon maps */
38     #define photonMapping         (globalPmap || preCompPmap || \
39 <                                  causticPmap ||contribPmap)
40 <   #define causticPhotonMapping  (causticPmap)
41 <   #define directPhotonMapping   (directPmap)
42 <   #define volumePhotonMapping   (volumePmap)
39 >                                  causticPmap || contribPmap)
40 >   #define causticPhotonMapping  (causticPmap != NULL)
41 >   #define directPhotonMapping   (directPmap != NULL)
42 >   #define volumePhotonMapping   (volumePmap != NULL)
43     #define contribPhotonMapping  (contribPmap && contribPmap -> srcContrib)
44    
45    
# Line 54 | Line 57
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  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines