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.13 by rschregle, Fri Dec 7 20:02:40 2018 UTC vs.
Revision 2.15 by greg, Tue Sep 17 16:36:05 2024 UTC

# Line 54 | Line 54
54     #include "lookup.h"
55     #include <stdint.h>
56  
57
58  
57     /* Primary photon ray for light source contributions */
58     typedef struct {
59        int16    srcIdx;              /* Index of emitting light source */
# Line 119 | Line 117
117        PhotonPrimaryIdx     primary;       /* Index to primary ray */
118     } Photon;
119  
120 +   /* Define search queue and underlying data struct types */
121 + #ifdef PMAP_OOC
122 +   #include "pmapooc.h"
123 + #else
124 +   #include "pmapkdt.h"
125 + #endif
126  
127    
128     /* Define PMAP_FLOAT_FLUX to store photon flux as floats instead of
# Line 142 | Line 146
146  
147     /* Forward declaration */
148     struct PhotonMap;
145  
146  
147   /* Define search queue and underlying data struct types */
148 #ifdef PMAP_OOC
149   #include "pmapooc.h"
150 #else
151   #include "pmapkdt.h"
152 #endif
149  
150  
151     /* Mean size of heapfile write buffer, in number of photons */
# Line 269 | Line 265
265     #define isContribPmap(p)   ((p) -> type == PMAP_TYPE_CONTRIB)
266     #define isVolumePmap(p)    ((p) -> type == PMAP_TYPE_VOLUME)
267  
268 + #ifdef __cplusplus
269 + extern "C" {
270 + #endif
271  
273
272     void initPhotonMap (PhotonMap *pmap, PhotonMapType t);
273     /* Initialise empty photon map of specified type */
274  
# Line 317 | Line 315
315        are placed search queue starting with the furthest photon at pmap ->
316        squeue.node, and pmap -> squeue.tail being the number actually found. */
317  
318 <   void find1Photon (PhotonMap *pmap, const RAY *ray, Photon *photon);
319 <   /* Finds single closest photon to ray -> rop with similar normal.
320 <      Returns NULL if none found. */
318 >   Photon *find1Photon (PhotonMap *pmap, const RAY *ray, Photon *photon);
319 >   /* Find single closest photon to ray -> rop with similar normal.
320 >      Return NULL if none found, else the supplied Photon* buffer,
321 >      indicating that it contains a valid photon. */
322  
323     void getPhoton (PhotonMap *pmap, PhotonIdx idx, Photon *photon);
324     /* Retrieve photon referenced by idx from pmap -> store */
# Line 333 | Line 332
332      
333     void deletePhotons (PhotonMap*);
334     /* Free dem mammaries... */
335 +
336 + #ifdef __cplusplus
337 + }
338 + #endif
339  
340   #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines