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.2 by rschregle, Fri May 8 13:20:23 2015 UTC vs.
Revision 2.7 by greg, Tue Sep 1 16:27:52 2015 UTC

# Line 1 | Line 1
1 + #ifndef lint
2 + static const char RCSid[] = "$Id$";
3 + #endif
4   /*
5     ==================================================================
6     Photon map interface to RADIANCE render options
# Line 8 | Line 11
11     supported by the Swiss National Science Foundation (SNSF, #147053)
12     ==================================================================  
13    
11   $Id$
14   */
15  
16  
17  
18 < #include <stdlib.h>
18 > #include "ray.h"
19   #include "pmapparm.h"
18 #include "rtio.h"
19 #include "rterror.h"
20  
21  
22  
# Line 35 | Line 35 | int getPmapRenderOpt (int ac, char *av [])
35        case 'a':
36           switch (av [0][2]) {
37              case 'p': /* photon map */
38 +               /* Asking for photon map, ergo ambounce != 0 */
39 +               ambounce += (ambounce == 0);
40                 if (!check(3, "s")) {
41                    /* File -> assume bwidth = 1 or precomputed pmap */
42                    if (++t >= NUM_PMAP_TYPES)
# Line 72 | Line 74 | int getPmapRenderOpt (int ac, char *av [])
74                 }
75                 else return 2;
76                
77 <            case 'm': /* max photon search radius coefficient */
78 <               if (check(3, "f") || (maxDistCoeff = atof(av [1])) <= 0)
77 >            case 'm': /* Fixed max photon search radius */
78 >               if (check(3, "f") || (maxDistFix = atof(av [1])) <= 0)
79                    error(USER, "invalid max photon search radius coefficient");
80  
81                 return 1;
# Line 90 | Line 92 | int getPmapRenderOpt (int ac, char *av [])
92   void printPmapDefaults ()
93   /* Print defaults for photon map render options */
94   {
95 <   puts("-ap file [bwidth1 [bwidth2]]\t# photon map");
94 <   printf("-am %.1f\t\t\t# max photon search radius coeff\n", maxDistCoeff);
95 >   printf("-am %.1f\t\t\t\t# max photon search radius\n", maxDistFix);
96   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines