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.4 by greg, Sat Jan 23 22:30:29 2010 UTC vs.
Revision 2.5 by greg, Thu Jan 27 22:28:12 2011 UTC

# Line 32 | Line 32 | while (<>) {
32                  $srcmod = $_;
33                  $lightline = $#skydesc;
34          } elsif (defined($srcmod) && /^($srcmod)\s+source\s/) {
35 <                @sunval = split(/\s+/, $skydesc[$lightline + 3]);
35 >                @sunval = split(' ', $skydesc[$lightline + 3]);
36                  shift @sunval;
37                  $sunline = $#skydesc;
38          } elsif (/\sskyfunc\s*$/) {
# Line 43 | Line 43 | die "Bad sky description!\n" if (! $skyOK);
43   # Strip out the solar source if present
44   my @sundir;
45   if (defined $sunline) {
46 <        @sundir = split(/\s+/, $skydesc[$sunline + 3]);
46 >        @sundir = split(' ', $skydesc[$sunline + 3]);
47          shift @sundir;
48          undef @sundir if ($sundir[2] <= 0);
49          splice(@skydesc, $sunline, 5);
# Line 102 | Line 102 | if (@sundir) {
102          my (@ang, @dom, @ndx);
103          my $wtot = 0;
104          for my $i (0..2) {
105 <                ($ang[$i], $dom[$i], $ndx[$i]) = split(/\s+/, $bestdir[$i]);
105 >                ($ang[$i], $dom[$i], $ndx[$i]) = split(' ', $bestdir[$i]);
106                  $wtot += 1./($ang[$i]+.02);
107          }
108          for my $i (0..2) {
109                  my $wt = 1./($ang[$i]+.02)/$wtot * $somega / $dom[$i];
110 <                my @scolor = split(/\s+/, $tregval[$ndx[$i]]);
110 >                my @scolor = split(' ', $tregval[$ndx[$i]]);
111                  for my $j (0..2) { $scolor[$j] += $wt * $sunval[$j]; }
112                  $tregval[$ndx[$i]] = "$scolor[0]\t$scolor[1]\t$scolor[2]\n";
113          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines