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

Comparing ray/src/hd/rhd_x11.c (file contents):
Revision 3.2 by gregl, Thu Nov 20 18:04:28 1997 UTC vs.
Revision 3.5 by gregl, Fri Nov 21 15:11:43 1997 UTC

# Line 100 | Line 100 | char  *id;
100          XSizeHints      oursizhints;
101                                          /* set quadtree globals */
102          qtDepthEps = 0.02;
103 <        qtMinNodesiz = 1;
103 >        qtMinNodesiz = 2;
104                                          /* open display server */
105          ourdisplay = XOpenDisplay(NULL);
106          if (ourdisplay == NULL)
# Line 212 | Line 212 | int
212   dev_input()                     /* get X11 input */
213   {
214          inpresflags = 0;
215 +
216          do
217                  getevent();
218  
# Line 384 | Line 385 | int    dx, dy, move;
385   {
386          VIEW    nv;
387          double  d;
388 <        register int    i;
388 >        register int    i, li;
389                                  /* start with old view */
390          copystruct(&nv, &odev.v);
391                                  /* change view direction */
392          if (move) {
393 <                register RLEAF  *lp;
393 <                if ((lp = qtFindLeaf(dx, dy)) == NULL)
393 >                if ((li = qtFindLeaf(dx, dy)) < 0)
394                          return(0);      /* not on window */
395                  for (i = 0; i < 3; i++)
396 <                        nv.vdir[i] = lp->wp[i] - nv.vp[i];
396 >                        nv.vdir[i] = qtL.wp[li][i] - nv.vp[i];
397          } else {
398                  if (viewray(nv.vp, nv.vdir, &odev.v,
399                                  (dx+.5)/odev.hres, (dy+.5)/odev.vres) < -FTINY)
# Line 432 | Line 432 | XButtonPressedEvent    *ebut;
432          unsigned int    statemask;
433  
434          qtMinNodesiz = 16;              /* for quicker update */
435 +        qtCompost(50);
436  
437          do {
438                  if (!XQueryPointer(ourdisplay, gwind, &rootw, &childw,
# Line 440 | Line 441 | XButtonPressedEvent    *ebut;
441  
442                  if (!moveview(wx, odev.vres-1-wy, MOVDIR(whichbutton)))
443                          sleep(1);
444 +                else
445 +                        qtUpdate();
446  
447          } while (!XCheckMaskEvent(ourdisplay,
448                          ButtonReleaseMask, levptr(XEvent)));
# Line 472 | Line 475 | register XKeyPressedEvent  *ekey;
475          case 'H':                       /* turn off height motion lock */
476                  headlocked = 0;
477                  return;
478 <        case CTRL('Z'):
478 >        case CTRL('S'):
479          case 'p':                       /* pause computation */
480                  inpresflags |= DEV_WAIT;
481                  return;
482 +        case CTRL('Q'):
483          case '\n':
484 <        case '\r':                      /* release */
484 >        case '\r':                      /* resume computation */
485 >                inpresflags |= DEV_RESUME;
486 >                return;
487 >        case CTRL('R'):                 /* redraw */
488 >                if (ncolors > 0)
489 >                        new_ctab(ncolors);
490 >                qtRedraw(0, 0, odev.hres, odev.vres);
491                  return;
492          case CTRL('D'):
493          case 'Q':

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines