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

Comparing ray/src/rt/pmapopt.c (file contents):
Revision 2.7 by greg, Tue Sep 1 16:27:52 2015 UTC vs.
Revision 2.8 by rschregle, Tue May 17 17:39:47 2016 UTC

# Line 1 | Line 1
1   #ifndef lint
2   static const char RCSid[] = "$Id$";
3   #endif
4 +
5   /*
6     ==================================================================
7     Photon map interface to RADIANCE render options
# Line 11 | Line 12 | static const char RCSid[] = "$Id$";
12     supported by the Swiss National Science Foundation (SNSF, #147053)
13     ==================================================================  
14    
15 +   $Id$
16   */
17  
18  
# Line 35 | Line 37 | int getPmapRenderOpt (int ac, char *av [])
37        case 'a':
38           switch (av [0][2]) {
39              case 'p': /* photon map */
40 <               /* Asking for photon map, ergo ambounce != 0 */
41 <               ambounce += (ambounce == 0);
40 >               /* Asking for photon map, ergo ambounce != 0 */
41 >               ambounce += (ambounce == 0);
42 >              
43                 if (!check(3, "s")) {
44                    /* File -> assume bwidth = 1 or precomputed pmap */
45                    if (++t >= NUM_PMAP_TYPES)
# Line 79 | Line 82 | int getPmapRenderOpt (int ac, char *av [])
82                    error(USER, "invalid max photon search radius coefficient");
83  
84                 return 1;
85 +
86 + #ifdef PMAP_OOC            
87 +            case 'c': /* OOC pmap cache page size ratio */
88 +               if (check(3, "f") || (pmapCachePageSize = atof(av [1])) <= 0)
89 +                  error(USER, "invalid photon cache page size ratio");
90 +                  
91 +               return 1;
92 +              
93 +            case 'C': /* OOC pmap cache size (in photons); 0 = no caching */
94 +               if (check(3, "s"))
95 +                  error(USER, "invalid number of cached photons");
96 +
97 +               /* Parsing failure sets to zero and disables caching */
98 +               pmapCacheSize = parseMultiplier(av [1]);
99 +
100 +               return 1;
101 + #endif              
102           }      
103     }
104   #undef check
# Line 93 | Line 113 | void printPmapDefaults ()
113   /* Print defaults for photon map render options */
114   {
115     printf("-am %.1f\t\t\t\t# max photon search radius\n", maxDistFix);
116 + #ifdef PMAP_OOC
117 +   printf("-ac %.1f\t\t\t\t# photon cache page size ratio\n",
118 +          pmapCachePageSize);
119 +   printf("-aC %ld\t\t\t# num cached photons\n", pmapCacheSize);
120 + #endif  
121   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines