--- ray/src/rt/pmapooc.h 2016/05/18 08:22:45 1.1 +++ ray/src/rt/pmapooc.h 2020/04/08 15:14:21 1.2 @@ -7,7 +7,7 @@ supported by the Swiss National Science Foundation (SNSF, #147053) ================================================================== - $Id: pmapooc.h,v 1.1 2016/05/18 08:22:45 rschregle Exp $ + $Id: pmapooc.h,v 1.2 2020/04/08 15:14:21 rschregle Exp $ */ @@ -59,24 +59,26 @@ void OOC_InitFindPhotons (struct PhotonMap *pmap); /* Initialise NN search queue prior to calling kdT_FindPhotons() */ - void OOC_FindPhotons (struct PhotonMap* pmap, const FVECT pos, - const FVECT norm); + int OOC_FindPhotons (struct PhotonMap* pmap, const FVECT pos, + const FVECT norm); /* Locate pmap -> squeue.len nearest photons to pos with similar normal * (NULL for volume photons) and return in search queue pmap -> squeue, - * starting with the further photon at pmap -> squeue.node */ + * starting with the further photon at pmap -> squeue.node. Return -1 + * if none found, else 0. */ - void OOC_Find1Photon (struct PhotonMap* pmap, const FVECT pos, - const FVECT norm, Photon *photon); - /* Locate single nearest photon to pos with similar normal */ + int OOC_Find1Photon (struct PhotonMap* pmap, const FVECT pos, + const FVECT norm, Photon *photon); + /* Locate single nearest photon to pos with similar normal. Return -1 + * if none found, else 0. */ int OOC_GetPhoton (struct PhotonMap *pmap, PhotonIdx idx, Photon *photon); - /* Retrieve photon referenced by idx from leaf file and return 0 on - * success, else -1. */ + /* Retrieve photon referenced by idx from leaf file and return -1 on + * error, else 0. */ Photon *OOC_GetNearestPhoton (const PhotonSearchQueue *squeue, PhotonIdx idx); - /* Retrieve photon from NN search queue after OOC_FindPhotons() */ + /* Retrieve photon from NN search queue after OOC_FindPhotons() */ PhotonIdx OOC_FirstPhoton (const struct PhotonMap* pmap); /* Return index to first photon in octree */