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.5 by greg, Fri Jan 7 20:33:02 2005 UTC vs.
Revision 3.9 by greg, Thu Apr 28 16:28:20 2016 UTC

# Line 286 | Line 286 | dev_view(                      /* assign new driver view */
286  
287   extern void
288   dev_section(            /* add octree for geometry rendering */
289 <        char    *ofn
289 >        char    *gfn,
290 >        char    *pfn
291   )
292   {
293          /* unimplemented */
# Line 343 | Line 344 | dev_flush(void)                        /* flush output */
344  
345   extern void
346   dev_cone(               /* render a cone in view coordinates */
347 <        BYTE    rgb[3],
347 >        uby8    rgb[3],
348          FVECT   ip,
349          double  rad
350   )
# Line 464 | 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 483 | Line 491 | draw3dline(                    /* draw 3d line in world coordinates */
491   static void
492   draw_grids(void)                        /* draw holodeck section grids */
493   {
494 <        static BYTE     gridrgba[4] = {0x0, 0xff, 0xff, 0x00};
494 >        static uby8     gridrgba[4] = {0x0, 0xff, 0xff, 0x00};
495          double  xmin, xmax, ymin, ymax, zmin, zmax;
496          double  d;
497                                          /* can we even do it? */
# Line 555 | 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);
561                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