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

Comparing ray/src/rt/pmapray.c (file contents):
Revision 2.6 by rschregle, Tue May 17 17:39:47 2016 UTC vs.
Revision 2.9 by greg, Sat Mar 23 16:40:52 2024 UTC

# Line 16 | Line 16 | static const char RCSid[] = "$Id$";
16   */
17  
18  
19 + #include "ray.h"
20   #include "pmapray.h"
21   #include "pmap.h"
22  
# Line 24 | Line 25 | void ray_init_pmap ()
25   /* Interface to ray_init(); init & load photon maps */
26   {
27     loadPmaps(photonMaps, pmapParams);
28 +
29 +   if (NCSAMP > 3 && photonMapping)
30 +        error(USER, "hyperspectral photon-mapping currently unsupported");
31   }
32  
33  
# Line 47 | Line 51 | void ray_save_pmap (RAYPARAMS *rp)
51    
52        rp -> pmapParams [t].minGather = pmapParams [t].minGather;
53        rp -> pmapParams [t].maxGather = pmapParams [t].maxGather;
54 +      rp -> pmapParams [t].distribTarget = pmapParams [t].distribTarget;
55     }
56   }
57  
# Line 60 | Line 65 | void ray_restore_pmap (RAYPARAMS *rp)
65        pmapParams [t].fileName = rp -> pmapParams [t].fileName;
66        pmapParams [t].minGather = rp -> pmapParams [t].minGather;
67        pmapParams [t].maxGather = rp -> pmapParams [t].maxGather;
68 +      pmapParams [t].distribTarget = rp -> pmapParams [t].distribTarget;
69 +   }
70 + }
71 +
72 + void ray_defaults_pmap (RAYPARAMS *rp)
73 + /* Interface to ray_defaults(); set photon mapping defaults */
74 + {
75 +   unsigned t;
76 +  
77 +   for (t = 0; t < NUM_PMAP_TYPES; t++) {
78 +      rp -> pmapParams [t].fileName = NULL;
79 +      rp -> pmapParams [t].minGather = 0;
80 +      rp -> pmapParams [t].maxGather = 0;
81 +      rp -> pmapParams [t].distribTarget = 0;
82     }
83   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines