--- ray/src/px/pinterp.c 1993/04/12 09:58:09 2.12 +++ ray/src/px/pinterp.c 1994/12/21 16:59:03 2.14 @@ -1,4 +1,4 @@ -/* Copyright (c) 1993 Regents of the University of California */ +/* Copyright (c) 1994 Regents of the University of California */ #ifndef lint static char SCCSid[] = "$SunId$ LBL"; @@ -186,7 +186,11 @@ char *argv[]; if (fillsamp == 1) fillo &= ~F_BACK; /* set view */ - if (err = setview(&ourview)) { + if (ourview.vaft > FTINY) + err = "no aft clipping plane allowed"; + else + err = setview(&ourview); + if (err != NULL) { fprintf(stderr, "%s: %s\n", progname, err); exit(1); } @@ -197,6 +201,8 @@ char *argv[]; if (ourpict == NULL || ourzbuf == NULL) syserror(progname); bzero((char *)ourzbuf, hresolu*vresolu*sizeof(float)); + /* new header */ + newheader("RADIANCE", stdout); /* get input */ for ( ; i < argc; i += 2) addpicture(argv[i], argv[i+1]); @@ -241,8 +247,9 @@ char *s; { char fmt[32]; - if (isformat(s)) { - formatval(fmt, s); + if (isheadid(s)) + return; + if (formatval(fmt, s)) { wrongformat = strcmp(fmt, COLRFMT); return; } @@ -491,7 +498,7 @@ FVECT pos; pos[1] += .5 - ourview.voff; return(0); } - if (viewray(pt, direc, &theirview, pos[0], pos[1]) < 0) + if (viewray(pt, direc, &theirview, pos[0], pos[1]) < -FTINY) return(-1); pt[0] += direc[0]*pos[2]; pt[1] += direc[1]*pos[2];