--- ray/src/px/pcomb.c 2004/03/28 20:33:14 2.32 +++ ray/src/px/pcomb.c 2005/02/16 03:26:33 2.36 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: pcomb.c,v 2.32 2004/03/28 20:33:14 schorsch Exp $"; +static const char RCSid[] = "$Id: pcomb.c,v 2.36 2005/02/16 03:26:33 greg Exp $"; #endif /* * Combine picture files according to calcomp functions. @@ -8,9 +8,8 @@ static const char RCSid[] = "$Id: pcomb.c,v 2.32 2004/ */ #include "platform.h" +#include "standard.h" #include "rtprocess.h" -#include "rterror.h" -#include "rtmisc.h" #include "color.h" #include "calcomp.h" #include "view.h" @@ -335,8 +334,6 @@ double (*ourbright)() = rgb_bright; static void init(void) /* perform final setup */ { - double l_colin(char *), l_expos(char *), l_pixaspect(char *), - l_ray(char *), l_psize(char *); register int i; /* define constants */ varset("PI", ':', PI); @@ -604,22 +601,22 @@ l_psize(char *nm) /* compute pixel size in steradians if (input[fn].vw.type == 0) errno = EDOM; else if (input[fn].vw.type != VT_PAR && - funvalue(vray[6], 1, &d) >= 0) { + funvalue(vray[6], 1, &d) >= -FTINY) { for (i = 0; i < 3; i++) dir0[i] = funvalue(vray[3+i], 1, &d); pix2loc(locx, &input[fn].rs, xscan+1, ymax-1-yscan); pix2loc(locy, &input[fn].rs, xscan, ymax-yscan); if (viewray(org, dirx, &input[fn].vw, - locx[0], locx[1]) >= 0 && + locx[0], locx[1]) >= -FTINY && viewray(org, diry, &input[fn].vw, - locy[0], locy[1]) >= 0) { + locy[0], locy[1]) >= -FTINY) { /* approximate solid angle */ for (i = 0; i < 3; i++) { dirx[i] -= dir0[i]; diry[i] -= dir0[i]; } fcross(dir0, dirx, diry); - psize[fn] = sqrt(DOT(dir0,dir0)); + psize[fn] = VLEN(dir0); } } ltick[fn] = eclock;