| 17 |
|
|
| 18 |
|
#include "oocnn.h" |
| 19 |
|
|
| 20 |
+ |
#ifdef __cplusplus |
| 21 |
+ |
extern "C" { |
| 22 |
+ |
#endif |
| 23 |
+ |
|
| 24 |
|
|
| 21 |
– |
|
| 25 |
|
/* Suffixes for octree filenames */ |
| 26 |
|
/* #define PMAP_OOC_NODESUFFIX ".node" |
| 27 |
|
#define PMAP_OOC_HEAPSUFFIX ".heap" */ |
| 62 |
|
void OOC_InitFindPhotons (struct PhotonMap *pmap); |
| 63 |
|
/* Initialise NN search queue prior to calling kdT_FindPhotons() */ |
| 64 |
|
|
| 65 |
< |
void OOC_FindPhotons (struct PhotonMap* pmap, const FVECT pos, |
| 66 |
< |
const FVECT norm); |
| 65 |
> |
int OOC_FindPhotons (struct PhotonMap* pmap, const FVECT pos, |
| 66 |
> |
const FVECT norm); |
| 67 |
|
/* Locate pmap -> squeue.len nearest photons to pos with similar normal |
| 68 |
|
* (NULL for volume photons) and return in search queue pmap -> squeue, |
| 69 |
< |
* starting with the further photon at pmap -> squeue.node */ |
| 69 |
> |
* starting with the further photon at pmap -> squeue.node. Return -1 |
| 70 |
> |
* if none found, else 0. */ |
| 71 |
|
|
| 72 |
< |
void OOC_Find1Photon (struct PhotonMap* pmap, const FVECT pos, |
| 73 |
< |
const FVECT norm, Photon *photon); |
| 74 |
< |
/* Locate single nearest photon to pos with similar normal */ |
| 72 |
> |
int OOC_Find1Photon (struct PhotonMap* pmap, const FVECT pos, |
| 73 |
> |
const FVECT norm, Photon *photon); |
| 74 |
> |
/* Locate single nearest photon to pos with similar normal. Return -1 |
| 75 |
> |
* if none found, else 0. */ |
| 76 |
|
|
| 77 |
|
int OOC_GetPhoton (struct PhotonMap *pmap, PhotonIdx idx, |
| 78 |
|
Photon *photon); |
| 79 |
< |
/* Retrieve photon referenced by idx from leaf file and return 0 on |
| 80 |
< |
* success, else -1. */ |
| 79 |
> |
/* Retrieve photon referenced by idx from leaf file and return -1 on |
| 80 |
> |
* error, else 0. */ |
| 81 |
|
|
| 82 |
|
Photon *OOC_GetNearestPhoton (const PhotonSearchQueue *squeue, |
| 83 |
|
PhotonIdx idx); |
| 84 |
< |
/* Retrieve photon from NN search queue after OOC_FindPhotons() */ |
| 84 |
> |
/* Retrieve photon from NN search queue after OOC_FindPhotons() */ |
| 85 |
|
|
| 86 |
|
PhotonIdx OOC_FirstPhoton (const struct PhotonMap* pmap); |
| 87 |
< |
/* Return index to first photon in octree */ |
| 87 |
> |
/* Return index to first photon in octree */ |
| 88 |
> |
|
| 89 |
> |
#ifdef __cplusplus |
| 90 |
> |
} |
| 91 |
> |
#endif |
| 92 |
> |
|
| 93 |
|
#endif |