--- ray/src/rt/rview.c 1993/02/10 14:03:01 2.10 +++ ray/src/rt/rview.c 1994/12/21 09:52:07 2.14 @@ -41,6 +41,8 @@ double srcsizerat = 0.; /* maximum ratio source size/ double specthresh = .3; /* specular sampling threshold */ double specjitter = 1.; /* specular sampling jitter */ +int backvis = 1; /* back face visibility */ + int maxdepth = 4; /* maximum recursion depth */ double minweight = 1e-2; /* minimum ray weight */ @@ -58,6 +60,8 @@ char *devname = dev_default; /* output device name * struct driver *dev = NULL; /* driver functions */ +char rifname[128]; /* rad input file name */ + VIEW oldview; /* previous view parameters */ PNODE ptrunk; /* the base of our image */ @@ -208,14 +212,29 @@ again: goto commerr; lastview(args); break; + case 'V': /* save view */ + if (badcom("V")) + goto commerr; + saveview(args); + break; + case 'L': /* load view */ + if (badcom("L")) + goto commerr; + loadview(args); + break; case 'e': /* exposure */ if (badcom("exposure")) goto commerr; getexposure(args); break; case 's': /* set a parameter */ - if (badcom("set")) + if (badcom("set")) { +#ifdef SIGTSTP + if (!badcom("stop")) + goto dostop; +#endif goto commerr; + } setparam(args); break; case 'n': /* new picture */ @@ -249,16 +268,23 @@ again: break; case 'r': /* rotate/repaint */ if (badcom("rotate")) { - if (badcom("repaint")) - goto commerr; + if (badcom("repaint")) { + if (badcom("redraw")) + goto commerr; + redraw(); + break; + } getrepaint(args); break; } getrotate(args); break; case 'p': /* pivot view */ - if (badcom("pivot")) - goto commerr; + if (badcom("pivot")) { + if (badcom("pause")) + goto commerr; + goto again; + } getpivot(args); break; case CTRL('R'): /* redraw */ @@ -276,7 +302,8 @@ again: case CTRL('C'): /* interrupt */ goto again; #ifdef SIGTSTP - case CTRL('Z'): /* stop */ + case CTRL('Z'):; /* stop */ +dostop: devclose(); kill(0, SIGTSTP); /* pc stops here */ @@ -315,8 +342,8 @@ rsample() /* sample the image */ * difference, we subsample the super-pixels. The testing process * includes initialization of the next row. */ - xsiz = (((pframe.r-pframe.l)<