ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/rt/pmapkdt.h
(Generate patch)

Comparing ray/src/rt/pmapkdt.h (file contents):
Revision 1.1 by rschregle, Wed May 18 08:22:45 2016 UTC vs.
Revision 1.3 by greg, Tue Sep 17 16:36:05 2024 UTC

# Line 19 | Line 19
19     #include "fvect.h" */
20     #include "pmapdata.h"
21    
22 + #ifdef __cplusplus
23 + extern "C" {
24 + #endif
25  
26     /* Forward declarations to break dependency loop with pmapdata.h */
27     struct PhotonMap;
28  
26
29     /* k-d tree as linear array of photons */
30     typedef struct {
31        Photon   *nodes;  /* k-d tree as linear array */
# Line 65 | Line 67
67     void kdT_InitFindPhotons (struct PhotonMap *pmap);
68     /* Initialise NN search queue prior to calling kdT_FindPhotons() */
69    
70 <   void kdT_FindPhotons (struct PhotonMap* pmap, const FVECT pos,
71 <                         const FVECT norm);  
70 >   int kdT_FindPhotons (struct PhotonMap* pmap, const FVECT pos,
71 >                        const FVECT norm);  
72     /* Locate pmap -> squeue.len nearest photons to pos with similar normal
73      * (NULL for volume photons) and return in search queue pmap -> squeue,
74 <    * starting with the further photon at pmap -> squeue.node */
74 >    * starting with the further photon at pmap -> squeue.node. Return -1
75 >    * if none found, else 0. */
76  
77 <   void kdT_Find1Photon (struct PhotonMap* pmap, const FVECT pos,
78 <                         const FVECT norm, Photon *photon);
79 <   /* Locate single nearest photon to pos with similar normal */
77 >   int kdT_Find1Photon (struct PhotonMap* pmap, const FVECT pos,
78 >                        const FVECT norm, Photon *photon);
79 >   /* Locate single nearest photon to pos with similar normal. Return -1
80 >    * if none found, else 0. */
81    
82     int kdT_GetPhoton (const struct PhotonMap *pmap, PhotonIdx idx,
83                        Photon *photon);
84 <   /* Retrieve photon referenced by idx from kd-tree and return 0 on
85 <    * success, else -1. */
84 >   /* Retrieve photon referenced by idx from kd-tree and return -1 on
85 >    * error, else 0. */
86  
87     Photon *kdT_GetNearestPhoton (const PhotonSearchQueue *squeue,
88                                   PhotonIdx idx);
# Line 89 | Line 93
93    
94     void kdT_Delete (PhotonKdTree *kdt);
95     /* Self-destruct */
96 +
97 + #ifdef __cplusplus
98 + }
99 + #endif
100  
101   #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines