| 1 |
< |
/* Copyright (c) 1993 Regents of the University of California */ |
| 1 |
> |
/* Copyright (c) 1994 Regents of the University of California */ |
| 2 |
|
|
| 3 |
|
#ifndef lint |
| 4 |
|
static char SCCSid[] = "$SunId$ LBL"; |
| 186 |
|
if (fillsamp == 1) |
| 187 |
|
fillo &= ~F_BACK; |
| 188 |
|
/* set view */ |
| 189 |
< |
if (err = setview(&ourview)) { |
| 189 |
> |
if (ourview.vaft > FTINY) |
| 190 |
> |
err = "no aft clipping plane allowed"; |
| 191 |
> |
else |
| 192 |
> |
err = setview(&ourview); |
| 193 |
> |
if (err != NULL) { |
| 194 |
|
fprintf(stderr, "%s: %s\n", progname, err); |
| 195 |
|
exit(1); |
| 196 |
|
} |
| 201 |
|
if (ourpict == NULL || ourzbuf == NULL) |
| 202 |
|
syserror(progname); |
| 203 |
|
bzero((char *)ourzbuf, hresolu*vresolu*sizeof(float)); |
| 204 |
+ |
/* new header */ |
| 205 |
+ |
newheader("RADIANCE", stdout); |
| 206 |
|
/* get input */ |
| 207 |
|
for ( ; i < argc; i += 2) |
| 208 |
|
addpicture(argv[i], argv[i+1]); |
| 247 |
|
{ |
| 248 |
|
char fmt[32]; |
| 249 |
|
|
| 250 |
< |
if (isformat(s)) { |
| 251 |
< |
formatval(fmt, s); |
| 250 |
> |
if (isheadid(s)) |
| 251 |
> |
return; |
| 252 |
> |
if (formatval(fmt, s)) { |
| 253 |
|
wrongformat = strcmp(fmt, COLRFMT); |
| 254 |
|
return; |
| 255 |
|
} |
| 310 |
|
register int x; |
| 311 |
|
if (!isfloat(zspec) || (zvalue = atof(zspec)) <= 0.0) |
| 312 |
|
syserror(zspec); |
| 306 |
– |
exit(1); |
| 313 |
|
for (x = scanlen(&tresolu); x-- > 0; ) |
| 314 |
|
zin[x] = zvalue; |
| 315 |
|
} |
| 498 |
|
pos[1] += .5 - ourview.voff; |
| 499 |
|
return(0); |
| 500 |
|
} |
| 501 |
< |
if (viewray(pt, direc, &theirview, pos[0], pos[1]) < 0) |
| 501 |
> |
if (viewray(pt, direc, &theirview, pos[0], pos[1]) < -FTINY) |
| 502 |
|
return(-1); |
| 503 |
|
pt[0] += direc[0]*pos[2]; |
| 504 |
|
pt[1] += direc[1]*pos[2]; |