| 124 |
|
if (i == argc) |
| 125 |
|
normaspect(viewaspect(&vw), &pa, &rs.xr, &rs.yr); |
| 126 |
|
if (getdim) { |
| 127 |
< |
printf("-x %d -y %d\n", rs.xr, rs.yr); |
| 127 |
> |
printf("-x %d -y %d -ld%c\n", rs.xr, rs.yr, |
| 128 |
> |
vw.vaft > FTINY ? '+' : '-'); |
| 129 |
|
exit(0); |
| 130 |
|
} |
| 131 |
|
putrays(); |
| 140 |
|
|
| 141 |
|
putrays() |
| 142 |
|
{ |
| 143 |
+ |
static FLOAT loc[2]; |
| 144 |
+ |
static FVECT rorg, rdir; |
| 145 |
|
float *zbuf; |
| 146 |
|
int sc; |
| 147 |
< |
FLOAT loc[2]; |
| 145 |
< |
FVECT rorg, rdir; |
| 147 |
> |
double d; |
| 148 |
|
register int si, i; |
| 149 |
|
|
| 150 |
|
if (zfd >= 0) { |
| 165 |
|
} |
| 166 |
|
for (si = 0; si < scanlen(&rs); si++) { |
| 167 |
|
pix2loc(loc, &rs, si, sc); |
| 168 |
< |
if (viewray(rorg, rdir, &vw, loc[0], loc[1]) < -FTINY) |
| 168 |
> |
d = viewray(rorg, rdir, &vw, loc[0], loc[1]); |
| 169 |
> |
if (d < -FTINY) |
| 170 |
|
rorg[0] = rorg[1] = rorg[2] = |
| 171 |
|
rdir[0] = rdir[1] = rdir[2] = 0.; |
| 172 |
|
else if (zfd >= 0) |
| 174 |
|
rorg[i] += rdir[i]*zbuf[si]; |
| 175 |
|
rdir[i] = -rdir[i]; |
| 176 |
|
} |
| 177 |
+ |
else if (d > FTINY) { |
| 178 |
+ |
rdir[0] *= d; rdir[1] *= d; rdir[2] *= d; |
| 179 |
+ |
} |
| 180 |
|
(*putr)(rorg, rdir); |
| 181 |
|
} |
| 182 |
|
} |