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

Comparing ray/src/rt/rview.c (file contents):
Revision 2.11 by greg, Wed Aug 25 13:44:17 1993 UTC vs.
Revision 2.15 by greg, Fri Dec 8 18:49:24 1995 UTC

# Line 1 | Line 1
1 < /* Copyright (c) 1992 Regents of the University of California */
1 > /* Copyright (c) 1995 Regents of the University of California */
2  
3   #ifndef lint
4   static char SCCSid[] = "$SunId$ LBL";
# Line 38 | Line 38 | int  vspretest = 128;                  /* virtual source pretest dens
38   int  directvis = 1;                     /* sources visible? */
39   double  srcsizerat = 0.;                /* maximum ratio source size/dist. */
40  
41 + COLOR  cextinction = BLKCOLOR;          /* global extinction coefficient */
42 + double  salbedo = 0.;                   /* global scattering albedo */
43 + double  seccg = 0.;                     /* global scattering eccentricity */
44 + double  ssampdist = 0.;                 /* scatter sampling distance */
45 +
46   double  specthresh = .3;                /* specular sampling threshold */
47   double  specjitter = 1.;                /* specular sampling jitter */
48  
49 + int  backvis = 1;                       /* back face visibility */
50 +
51   int  maxdepth = 4;                      /* maximum recursion depth */
52   double  minweight = 1e-2;               /* minimum ray weight */
53  
# Line 226 | Line 233 | again:
233                  getexposure(args);
234                  break;
235          case 's':                               /* set a parameter */
236 <                if (badcom("set"))
236 >                if (badcom("set")) {
237 > #ifdef  SIGTSTP
238 >                        if (!badcom("stop"))
239 >                                goto dostop;
240 > #endif
241                          goto commerr;
242 +                }
243                  setparam(args);
244                  break;
245          case 'n':                               /* new picture */
# Line 261 | Line 273 | again:
273                  break;
274          case 'r':                               /* rotate/repaint */
275                  if (badcom("rotate")) {
276 <                        if (badcom("repaint"))
277 <                                goto commerr;
276 >                        if (badcom("repaint")) {
277 >                                if (badcom("redraw"))
278 >                                        goto commerr;
279 >                                redraw();
280 >                                break;
281 >                        }
282                          getrepaint(args);
283                          break;
284                  }
285                  getrotate(args);
286                  break;
287          case 'p':                               /* pivot view */
288 <                if (badcom("pivot"))
289 <                        goto commerr;
288 >                if (badcom("pivot")) {
289 >                        if (badcom("pause"))
290 >                                goto commerr;
291 >                        goto again;
292 >                }
293                  getpivot(args);
294                  break;
295          case CTRL('R'):                         /* redraw */
# Line 288 | Line 307 | again:
307          case CTRL('C'):                         /* interrupt */
308                  goto again;
309   #ifdef  SIGTSTP
310 <        case CTRL('Z'):                         /* stop */
310 >        case CTRL('Z'):;                        /* stop */
311 > dostop:
312                  devclose();
313                  kill(0, SIGTSTP);
314                  /* pc stops here */
# Line 327 | Line 347 | rsample()                      /* sample the image */
347           * difference, we subsample the super-pixels.  The testing process
348           * includes initialization of the next row.
349           */
350 <        xsiz = (((pframe.r-pframe.l)<<pdepth)+hresolu-1) / hresolu;
351 <        ysiz = (((pframe.u-pframe.d)<<pdepth)+vresolu-1) / vresolu;
350 >        xsiz = (((long)(pframe.r-pframe.l)<<pdepth)+hresolu-1) / hresolu;
351 >        ysiz = (((long)(pframe.u-pframe.d)<<pdepth)+vresolu-1) / vresolu;
352          rl = (RECT *)malloc(xsiz*sizeof(RECT));
353          if (rl == NULL)
354                  return;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines