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

Comparing ray/src/util/genskyvec.pl (file contents):
Revision 2.7 by greg, Thu Sep 29 22:36:11 2011 UTC vs.
Revision 2.8 by greg, Thu Jun 28 20:48:03 2012 UTC

# Line 9 | Line 9 | use strict;
9   my $windoz = ($^O eq "MSWin32" or $^O eq "MSWin64");
10   my @skycolor = (0.960, 1.004, 1.118);
11   my $mf = 4;
12 + my $dosky = 1;
13   while ($#ARGV >= 0) {
14          if ("$ARGV[0]" eq "-c") {
15                  @skycolor = @ARGV[1..3];
16 <                shift @ARGV; shift @ARGV; shift @ARGV;
16 >                shift @ARGV for (1..3);
17          } elsif ("$ARGV[0]" eq "-m") {
18                  $mf = $ARGV[1];
19                  shift @ARGV;
20 +        } elsif ("$ARGV[0]" eq "-d") {
21 +                $dosky = 0;
22          }
23          shift @ARGV;
24   }
# Line 104 | Line 107 | if ($windoz) {
107                          q{-e '$1=if(1-dot,acos(dot),0);$2=Romega;$3=recno' };
108          }
109   }
110 < # Create octree for rtrace
111 < open OCONV, "| oconv - > $octree";
112 < print OCONV @skydesc;
113 < print OCONV "skyfunc glow skyglow 0 0 4 @skycolor 0\n";
114 < print OCONV "skyglow source sky 0 0 4 0 0 1 360\n";
115 < close OCONV;
116 < # Run rtrace and average output for every 16 samples
117 < my @tregval = `$tregcommand`;
118 < unlink $octree;
110 > my @tregval;
111 > if ($dosky) {
112 >        # Create octree for rtrace
113 >        open OCONV, "| oconv - > $octree";
114 >        print OCONV @skydesc;
115 >        print OCONV "skyfunc glow skyglow 0 0 4 @skycolor 0\n";
116 >        print OCONV "skyglow source sky 0 0 4 0 0 1 360\n";
117 >        close OCONV;
118 >        # Run rtrace and average output for every 16 samples
119 >        @tregval = `$tregcommand`;
120 >        unlink $octree;
121 > } else {
122 >        push @tregval, "0\t0\t0\n" for (1..$nbins);
123 > }
124   # Find closest 3 patches to sun and divvy up direct solar contribution
125   sub numSort1 {
126          my @a1 = split("\t", $a);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines