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

Comparing ray/src/util/vwrays.c (file contents):
Revision 3.20 by greg, Thu Nov 7 23:20:29 2019 UTC vs.
Revision 3.21 by greg, Fri Jun 12 22:45:20 2020 UTC

# Line 133 | Line 133 | main(
133                          fprintf(stderr, "%s: no view in picture\n", argv[i]);
134                          exit(1);
135                  }
136 <                if (i+1 < argc) {
136 >                if (!getdim & (i+1 < argc)) {
137                          zfd = open_float_depth(argv[i+1], (long)rs.xr*rs.yr);
138                          if (zfd < 0)
139                                  exit(1);
# Line 147 | Line 147 | main(
147                  normaspect(viewaspect(&vw), &pa, &rs.xr, &rs.yr);
148          if (getdim) {
149                  printf("-x %d -y %d -ld%c\n", rs.xr, rs.yr,
150 <                                vw.vaft > FTINY ? '+' : '-');
150 >                                (i+1 == argc) & (vw.vaft > FTINY) ? '+' : '-');
151                  exit(0);
152          }
153          if (fromstdin)
# Line 269 | Line 269 | putrays(void)
269                                  rdir[0] = rdir[1] = rdir[2] = 0.;
270                          else if (zfd >= 0)
271                                  for (i = 0; i < 3; i++) {
272 <                                        rorg[i] += rdir[i]*zbuf[si];
273 <                                        rdir[i] = -rdir[i];
272 >                                        rdir[i] = -rdir[i]*zbuf[si];
273 >                                        rorg[i] -= rdir[i];
274                                  }
275                          else if (d > FTINY) {
276                                  rdir[0] *= d; rdir[1] *= d; rdir[2] *= d;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines