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

Comparing ray/src/rt/pmapdata.h (file contents):
Revision 2.12 by rschregle, Thu Feb 8 19:55:02 2018 UTC vs.
Revision 2.13 by rschregle, Fri Dec 7 20:02:40 2018 UTC

# Line 28 | Line 28
28   #ifndef PMAPDATA_H
29     #define PMAPDATA_H
30  
31 <   #ifndef NIX
32 <      #if defined(_WIN32) || defined(_WIN64)
33 <         #define NIX 0
34 <      #else
35 <         #define NIX 1
36 <      #endif
37 <   #endif  
31 >   #ifndef NIX
32 >      #if defined(_WIN32) || defined(_WIN64)
33 >         #define NIX 0
34 >      #else
35 >         #define NIX 1
36 >      #endif
37 >   #endif
38  
39     #if (defined(PMAP_OOC) && !NIX)
40        #error "OOC currently only supported on NIX -- tuff luck."
41     #endif
42  
43 +   #ifdef PMAP_CBDM
44 +      /* Enable photon primary hitpoints and incident directions (see struct
45 +       * PhotonPrimary below).  Note this will increase the size of photon
46 +       * primaries 9-fold (10-fold after alignment)!!! */
47 +      #define  PMAP_PRIMARYPOS
48 +      #define  PMAP_PRIMARYDIR
49 +   #endif
50  
51 <   #include "ray.h"  
51 >   #include "ray.h"
52     #include "pmaptype.h"
53     #include "paths.h"
54     #include "lookup.h"
# Line 53 | Line 60
60     typedef struct {
61        int16    srcIdx;              /* Index of emitting light source */
62                                      /* !!! REDUCED FROM 32 BITS !!! */
63 < #ifdef PMAP_PRIMARYDIR                                    
63 > #ifdef PMAP_PRIMARYDIR
64        int32    dir;                 /* Encoded ray direction */
65 < #endif      
66 < #ifdef PMAP_PRIMARYPOS      
65 > #endif
66 > #ifdef PMAP_PRIMARYPOS
67        float    pos [3];             /* Hit point */
68 < #endif      
68 > #endif
69     } PhotonPrimary;
70        
71     #define photonSrcIdx(pm, p)      ((pm)->primaries[(p)->primary].srcIdx)
# Line 66 | Line 73
73  
74  
75     /* Photon primary ray index type and limit */
76 <   typedef  uint32            PhotonPrimaryIdx;      
76 >   typedef  uint32            PhotonPrimaryIdx;
77     #define  PMAP_MAXPRIMARY   UINT32_MAX
78  
79     /* Macros for photon's generating subprocess field */
80   #ifdef PMAP_OOC
81     #define  PMAP_PROCBITS  7
82 < #else            
83 <   #define  PMAP_PROCBITS  5  
82 > #else
83 >   #define  PMAP_PROCBITS  5
84   #endif
85     #define  PMAP_MAXPROC         (1 << PMAP_PROCBITS)
86     #define  PMAP_GETRAYPROC(r)   ((r) -> crtype >> 8)
# Line 105 | Line 112
112        };
113        
114   #ifdef PMAP_FLOAT_FLUX
115 <      COLOR                flux;          
115 >      COLOR                flux;
116   #else
117 <      COLR                 flux;          
117 >      COLR                 flux;
118   #endif
119        PhotonPrimaryIdx     primary;       /* Index to primary ray */
120     } Photon;
# Line 127 | Line 134
134  
135    
136     /* Bias compensation history node */
137 <   typedef struct {                  
137 >   typedef struct {
138        COLOR irrad;
139        float weight;
140     } PhotonBiasCompNode;
# Line 171 | Line 178
178        unsigned long  heapBufLen,       /* Current & max size of heapBuf */
179                       heapBufSize;
180        PhotonStorage  store;            /* Photon storage in space
181 <                                          subdividing data struct */            
181 >                                          subdividing data struct */
182        
183        /* ================================================================
184         * PHOTON DISTRIBUTION STUFF
# Line 208 | Line 215
215                      
216        /* ================================================================
217         * BIAS COMPENSATION STUFF
218 <       * ================================================================ */      
218 >       * ================================================================ */
219        PhotonBiasCompNode   *biasCompHist;    /* Bias compensation history */
220        
221  
222        /* ================================================================
223         * STATISTIX
224 <       * ================================================================ */            
224 >       * ================================================================ */
225        unsigned long  totalGathered,    /* Total photons gathered */
226                       numDensity,       /* Num density estimates */
227                       numLookups,       /* Counters for short photon lookups */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines