--- ray/src/hd/rholo4.c 1997/12/12 11:13:17 3.13 +++ ray/src/hd/rholo4.c 1998/05/22 08:30:41 3.18 @@ -13,7 +13,7 @@ static char SCCSid[] = "$SunId$ SGI"; #include #ifndef HDSUF -#define HDSUF ".hdisp" +#define HDSUF ".hdi" #endif static int inp_flags; @@ -53,6 +53,15 @@ char *dname; if (readinp) close(atoi(fd0)); close(atoi(fd1)); + /* check if outside */ + if (vdef(OBSTRUCTIONS) && vbool(OBSTRUCTIONS)) + disp_result(DS_OUTSECT, 0, NULL); + /* send eye separation if specified */ + if (vdef(EYESEP)) { + char fbuf[32]; + sprintf(fbuf, "%.9e", vflt(EYESEP)); + disp_result(DS_EYESEP, strlen(fbuf)+1, fbuf); + } /* write out hologram grids */ for (i = 0; hdlist[i] != NULL; i++) disp_result(DS_ADDHOLO, sizeof(HDGRID), (char *)hdlist[i]); @@ -124,7 +133,7 @@ int block; disp_result(DS_STARTIMM, 0, NULL); bundle_set(BS_ADD, (PACKHEAD *)buf, msg.nbytes/sizeof(PACKHEAD)); disp_result(DS_ENDIMM, 0, NULL); - disp_check(0); /* hack -- delete usu. follows add */ + disp_flush(); break; case DR_ADJSET: /* adjust calculation set members */ if (msg.nbytes % sizeof(PACKHEAD)) @@ -148,21 +157,17 @@ int block; case DR_KILL: /* kill computation process(es) */ if (msg.nbytes) error(INTERNAL, "bad DR_KILL from display process"); - if (nprocs > 0) { - done_packets(flush_queue()); - if (end_rtrace()) - error(WARNING, "bad status returned by rtrace"); - } else + if (nprocs > 0) + done_rtrace(); + else error(WARNING, "no rtrace process to kill"); break; case DR_RESTART: /* restart computation process(es) */ if (msg.nbytes) error(INTERNAL, "bad DR_RESTART from display process"); - if (ncprocs > nprocs) { - checkrad(); - if (start_rtrace() < 1) - error(WARNING, "cannot restart rtrace"); - } else if (nprocs > 0) + if (ncprocs > nprocs) + new_rtrace(); + else if (nprocs > 0) error(WARNING, "rtrace already runnning"); else error(WARNING, "holodeck not open for writing");