65 |
|
void kdT_InitFindPhotons (struct PhotonMap *pmap); |
66 |
|
/* Initialise NN search queue prior to calling kdT_FindPhotons() */ |
67 |
|
|
68 |
< |
void kdT_FindPhotons (struct PhotonMap* pmap, const FVECT pos, |
69 |
< |
const FVECT norm); |
68 |
> |
int kdT_FindPhotons (struct PhotonMap* pmap, const FVECT pos, |
69 |
> |
const FVECT norm); |
70 |
|
/* Locate pmap -> squeue.len nearest photons to pos with similar normal |
71 |
|
* (NULL for volume photons) and return in search queue pmap -> squeue, |
72 |
< |
* starting with the further photon at pmap -> squeue.node */ |
72 |
> |
* starting with the further photon at pmap -> squeue.node. Return -1 |
73 |
> |
* if none found, else 0. */ |
74 |
|
|
75 |
< |
void kdT_Find1Photon (struct PhotonMap* pmap, const FVECT pos, |
76 |
< |
const FVECT norm, Photon *photon); |
77 |
< |
/* Locate single nearest photon to pos with similar normal */ |
75 |
> |
int kdT_Find1Photon (struct PhotonMap* pmap, const FVECT pos, |
76 |
> |
const FVECT norm, Photon *photon); |
77 |
> |
/* Locate single nearest photon to pos with similar normal. Return -1 |
78 |
> |
* if none found, else 0. */ |
79 |
|
|
80 |
|
int kdT_GetPhoton (const struct PhotonMap *pmap, PhotonIdx idx, |
81 |
|
Photon *photon); |
82 |
< |
/* Retrieve photon referenced by idx from kd-tree and return 0 on |
83 |
< |
* success, else -1. */ |
82 |
> |
/* Retrieve photon referenced by idx from kd-tree and return -1 on |
83 |
> |
* error, else 0. */ |
84 |
|
|
85 |
|
Photon *kdT_GetNearestPhoton (const PhotonSearchQueue *squeue, |
86 |
|
PhotonIdx idx); |