--- ray/src/rt/rv3.c 1991/05/03 16:12:38 1.19 +++ ray/src/rt/rv3.c 1993/02/11 16:42:22 2.4 @@ -19,10 +19,20 @@ static char SCCSid[] = "$SunId$ LBL"; #include "random.h" #ifndef WFLUSH -#define WFLUSH 30 /* flush after this many rays */ +#ifdef SPEED +#define WFLUSH (5*SPEED) +#else +#define WFLUSH 100 /* flush after this many rays */ #endif +#endif +#ifdef SMLFLT +#define sscanvec(s,v) (sscanf(s,"%f %f %f",v,v+1,v+2)==3) +#else +#define sscanvec(s,v) (sscanf(s,"%lf %lf %lf",v,v+1,v+2)==3) +#endif + getrect(s, r) /* get a box */ char *s; register RECT *r; @@ -87,7 +97,7 @@ double *mp; error(COMMAND, "illegal magnification"); return(-1); } - if (sscanf(s, "%*lf %lf %lf %lf", &vec[0], &vec[1], &vec[2]) != 3) { + if (!sscanvec(sskip(s), vec)) { if (dev->getcur == NULL) return(-1); (*dev->comout)("Pick view center\n"); @@ -157,6 +167,7 @@ int xmin, ymin, xmax, ymax; setcolor(thisray.rcol, 0.0, 0.0, 0.0); } else { rayorigin(&thisray, NULL, PRIMARY, 1.0); + samplendx++; rayvalue(&thisray); } @@ -374,7 +385,6 @@ moveview(angle, elev, mag, vc) /* move viewpoint */ double angle, elev, mag; FVECT vc; { - extern double sqrt(), dist2(); double d; FVECT v1; VIEW nv;