ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/rt/rv3.c
(Generate patch)

Comparing ray/src/rt/rv3.c (file contents):
Revision 1.18 by greg, Tue Mar 19 13:14:03 1991 UTC vs.
Revision 2.3 by greg, Fri Oct 2 16:19:56 1992 UTC

# Line 22 | Line 22 | static char SCCSid[] = "$SunId$ LBL";
22   #define WFLUSH          30              /* flush after this many rays */
23   #endif
24  
25 + #ifdef  SMLFLT
26 + #define  sscanvec(s,v)  (sscanf(s,"%f %f %f",v,v+1,v+2)==3)
27 + #else
28 + #define  sscanvec(s,v)  (sscanf(s,"%lf %lf %lf",v,v+1,v+2)==3)
29 + #endif
30  
31 +
32   getrect(s, r)                           /* get a box */
33   char  *s;
34   register RECT  *r;
# Line 87 | Line 93 | double  *mp;
93                  error(COMMAND, "illegal magnification");
94                  return(-1);
95          }
96 <        if (sscanf(s, "%*lf %lf %lf %lf", &vec[0], &vec[1], &vec[2]) != 3) {
96 >        if (!sscanvec(sskip(s), vec)) {
97                  if (dev->getcur == NULL)
98                          return(-1);
99                  (*dev->comout)("Pick view center\n");
# Line 157 | Line 163 | int  xmin, ymin, xmax, ymax;
163                  setcolor(thisray.rcol, 0.0, 0.0, 0.0);
164          } else {
165                  rayorigin(&thisray, NULL, PRIMARY, 1.0);
166 +                samplendx++;
167                  rayvalue(&thisray);
168          }
169  
# Line 178 | Line 185 | newimage()                             /* start a new image */
185   {
186                                                  /* free old image */
187          freepkids(&ptrunk);
188 +                                                /* save reserve memory */
189 +        fillreserves();
190                                                  /* compute resolution */
191          hresolu = dev->xsiz;
192          vresolu = dev->ysiz;
# Line 372 | Line 381 | moveview(angle, elev, mag, vc)                 /* move viewpoint */
381   double  angle, elev, mag;
382   FVECT  vc;
383   {
375        extern double  sqrt(), dist2();
384          double  d;
385          FVECT  v1;
386          VIEW  nv;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines