| 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 */ |
| 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 |
| 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 */ |
| 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 |
|
|
| 332 |
|
|
| 333 |
|
void deletePhotons (PhotonMap*); |
| 334 |
|
/* Free dem mammaries... */ |
| 335 |
+ |
|
| 336 |
+ |
#ifdef __cplusplus |
| 337 |
+ |
} |
| 338 |
+ |
#endif |
| 339 |
|
|
| 340 |
|
#endif |