ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/util/genambpos.pl
(Generate patch)

Comparing ray/src/util/genambpos.pl (file contents):
Revision 2.4 by greg, Thu May 1 02:52:03 2014 UTC vs.
Revision 2.5 by greg, Thu May 1 04:51:12 2014 UTC

# Line 5 | Line 5
5   #
6   use strict;
7   sub userror {
8 <        print STDERR "Usage: genambpos [-l lvl][-w minwt][-s scale][-p][-d] scene.amb > ambloc.rad\n";
8 >        print STDERR "Usage: genambpos [-l lvl][-w minwt][-r rad][-s sf][-p][-d] scene.amb > ambloc.rad\n";
9          exit 1;
10   }
11   my $lvlsel = -1;
# Line 13 | Line 13 | my $scale = 0.25;
13   my $doposgrad = 0;
14   my $dodirgrad = 0;
15   my $minwt = 0.5001**6;
16 + my $fixedrad="";
17   my $savedARGV = "genambpos @ARGV";
18   # Get options
19   while ($#ARGV >= 0) {
# Line 29 | Line 30 | while ($#ARGV >= 0) {
30          } elsif ("$ARGV[0]" =~ /^-s/) {
31                  $scale = $ARGV[1];
32                  shift @ARGV;
33 +        } elsif ("$ARGV[0]" =~ /^-r/) {
34 +                $fixedrad = "-e psiz:$ARGV[1]";
35 +                shift @ARGV;
36          } elsif ("$ARGV[0]" =~ /^-./) {
37                  userror();
38          } else {
# Line 132 | Line 136 | dgval ring dgdisk${recno}b
136   # Load & convert ambient values
137   print "# Output produced by: $savedARGV\n";
138   system "lookamb -h -d $ARGV[0] | rcalc -e 'LV:$lvlsel;MW:$minwt;SF:$scale'" .
139 <                " -f rambpos.cal -e cond=acond -o '$ambfmt'";
139 >                " -f rambpos.cal -e cond=acond $fixedrad -o '$ambfmt'";
140   if ($doposgrad) {
141          system "lookamb -h -d $ARGV[0] " .
142                  "| rcalc -e 'LV:$lvlsel;MW:$minwt;SF:$scale'" .
143 <                " -f rambpos.cal -e cond=pcond -o '$posgradfmt'";
143 >                " -f rambpos.cal -e cond=pcond $fixedrad -o '$posgradfmt'";
144   }
145   if ($dodirgrad) {
146          system "lookamb -h -d $ARGV[0] " .

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines