177 |
|
|
178 |
|
|
179 |
|
double |
180 |
< |
getviewpix(vh, vv) /* compute single view pixel */ |
180 |
> |
getviewpix(vh, vv, se) /* compute single view pixel */ |
181 |
|
int vh, vv; |
182 |
+ |
SPANERR *se; |
183 |
|
{ |
184 |
|
FVECT dir; |
185 |
|
float rt_buf[6]; |
186 |
|
double res; |
187 |
|
|
188 |
< |
if (compdir(dir, vh, vv) < 0) |
188 |
> |
if (compdir(dir, vh, vv, se) < 0) |
189 |
|
return(-1.0); |
190 |
|
npixinvw++; |
191 |
|
if ((res = pict_val(dir)) >= 0.0) |
212 |
|
float rt_buf[6*MAXPIX]; /* rtrace send/receive buffer */ |
213 |
|
register int n; /* number of pixels in buffer */ |
214 |
|
short buf_vh[MAXPIX]; /* pixel positions */ |
215 |
+ |
SPANERR sperr; |
216 |
|
FVECT dir; |
217 |
|
register int vh; |
218 |
|
|
221 |
|
fprintf(stderr, "%s: computing view span at %d...\n", |
222 |
|
progname, vv); |
223 |
|
#endif |
224 |
+ |
setspanerr(&sperr, vv); |
225 |
|
n = 0; |
226 |
|
for (vh = -hsize; vh <= hsize; vh++) { |
227 |
< |
if (compdir(dir, vh, vv) < 0) { /* off viewable region */ |
227 |
> |
if (compdir(dir, vh, vv, &sperr) < 0) { /* not in view */ |
228 |
|
vb[vh+hsize] = -1.0; |
229 |
|
continue; |
230 |
|
} |
298 |
|
open_pict(fn) /* open picture file */ |
299 |
|
char *fn; |
300 |
|
{ |
298 |
– |
register int i; |
299 |
– |
|
301 |
|
if ((pictfp = fopen(fn, "r")) == NULL) { |
302 |
|
fprintf("%s: cannot open\n", fn); |
303 |
|
exit(1); |
314 |
|
|
315 |
|
close_pict() /* done with picture */ |
316 |
|
{ |
316 |
– |
register int i; |
317 |
– |
|
317 |
|
if (pictfp == NULL) |
318 |
|
return; |
319 |
|
fclose(pictfp); |