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

Comparing ray/src/hd/rhdisp.c (file contents):
Revision 3.19 by gregl, Sun Jan 4 12:28:09 1998 UTC vs.
Revision 3.20 by gregl, Sun Jan 4 18:37:10 1998 UTC

# Line 24 | Line 24 | char   cmdlist[DC_NCMDS][8] = DC_INIT;
24  
25   int     imm_mode = 0;           /* bundles are being delivered immediately */
26  
27 + int     do_outside = 0;         /* render from outside sections */
28 +
29   char    *progname;              /* global argv[0] */
30  
31   FILE    *sstdin, *sstdout;      /* server's standard input and output */
# Line 160 | Line 162 | add_holo(hdg)                  /* register a new holodeck section */
162   HDGRID  *hdg;
163   {
164          VIEW    nv;
165 +        double  d;
166          register int    hd;
167  
168          for (hd = 0; hd < HDMAX && hdlist[hd] != NULL; hd++)
# Line 180 | Line 183 | HDGRID *hdg;
183          VSUM(nv.vp, nv.vp, hdlist[0]->xv[2], 0.5);
184          fcross(nv.vdir, hdlist[0]->xv[1], hdlist[0]->xv[2]);
185          VCOPY(nv.vup, hdlist[0]->xv[2]);
186 +        if (do_outside) {
187 +                normalize(nv.vdir);
188 +                d = VLEN(hdlist[0]->xv[1]);
189 +                d += VLEN(hdlist[0]->xv[2]);
190 +                VSUM(nv.vp, nv.vp, nv.vdir, -d);
191 +        }
192          new_view(&nv);
193   }
194  
# Line 351 | Line 360 | serv_result()                  /* get next server result and process
360                  if (msg.nbytes != sizeof(HDGRID))
361                          error(INTERNAL, "bad holodeck record from server");
362                  add_holo((HDGRID *)buf);
363 +                break;
364 +        case DS_OUTSECT:
365 +                do_outside = 1;
366                  break;
367          case DS_STARTIMM:
368          case DS_ENDIMM:

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines