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

Comparing ray/src/hd/rhd_glx1.c (file contents):
Revision 3.7 by greg, Fri May 20 02:06:39 2011 UTC vs.
Revision 3.9 by greg, Thu Apr 28 16:28:20 2016 UTC

# Line 465 | Line 465 | getevent(void)                 /* get next event */
465                  getkey(levptr(XKeyPressedEvent));
466                  break;
467          case ButtonPress:
468 <                getmove(levptr(XButtonPressedEvent));
468 >                switch (levptr(XButtonPressedEvent)->button) {
469 >                case Button4:           /* wheel up */
470 >                case Button5:           /* wheel down */
471 >                        break;
472 >                default:
473 >                        getmove(levptr(XButtonPressedEvent));
474 >                        break;
475 >                }
476                  break;
477          }
478   }
# Line 556 | Line 563 | moveview(      /* move our view */
563                  VSUM(nv.vp, qtL.wp[li], odir, -1.);
564                  spinvector(nv.vdir, nv.vdir, nv.vup, d);
565          } else if (orb) {               /* orbit up/down */
566 <                fcross(v1, odir, nv.vup);
567 <                if (normalize(v1) == 0.)
566 >                if (geodesic(odir, odir, nv.vup,
567 >                                d=MOVDEG*PI/180.*orb, GEOD_RAD) == 0.0)
568                          return(0);
562                spinvector(odir, odir, v1, d=MOVDEG*PI/180.*orb);
569                  VSUM(nv.vp, qtL.wp[li], odir, -1.);
570 <                spinvector(nv.vdir, nv.vdir, v1, d);
570 >                geodesic(nv.vdir, nv.vdir, nv.vup, d, GEOD_RAD);
571          } else if (mov) {               /* move forward/backward */
572                  d = MOVPCT/100. * mov;
573                  VSUM(nv.vp, nv.vp, odir, d);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines