home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / sys / sgi / 13172 < prev    next >
Encoding:
Internet Message Format  |  1992-09-01  |  1.8 KB

  1. Path: sparky!uunet!cis.ohio-state.edu!rutgers!ub!acsu.buffalo.edu!beers
  2. From: beers@acsu.buffalo.edu (Andrew Beers)
  3. Newsgroups: comp.sys.sgi
  4. Subject: picking and gselecting...
  5. Message-ID: <BtxFHK.5wL@acsu.buffalo.edu>
  6. Date: 2 Sep 92 01:15:19 GMT
  7. Sender: nntp@acsu.buffalo.edu
  8. Organization: State University of New York at Buffalo/Comp Sci
  9. Lines: 47
  10. Nntp-Posting-Host: pegasus.cs.buffalo.edu
  11.  
  12.  
  13. Does picking or selecting mode work with non-orthographic viewing
  14. transformations?  If so, I am having a terrible time getting it to work.  I
  15. have experimented for a while, read example programs (all of which use
  16. ortho2), and RTFM.
  17.  
  18. This is what I'm trying to do:
  19.  
  20. I'm drawing a cube (or most of a cube) on the screen and would like to pick a
  21. corner of it by clicking it with the mouse.  I issue some viewing
  22. transformations:
  23.  
  24.     mmode(MPROJECTION);
  25.     window(-150,150,-150,150,-600,500);
  26.     mmode(MVIEWING);
  27.     lookat(0,0,-750,0,0,0,0);  
  28.  
  29. then draw the figure to see it on the screen.
  30.  
  31.     drawit(1);
  32.  
  33. Following the example programs and the documentation, I then re-issue my
  34. transformations and enter gselect mode:
  35.  
  36.     picksize(50,50);
  37.     mmode(MPROJECTION);
  38.     window(-150,150,-150,150,-500,500);
  39.     mmode(MVIEWING);
  40.     lookat(0,0,-750,0,0,0,0);
  41.     gselect(buffer, BUFSIZE);
  42.  
  43. redraw the figure (loading and pushing names on the name stack) , and end
  44. selecting mode:
  45.  
  46.     drawit(0);    /* no actual drawing takes place */
  47.     hits = endselect(buffer);
  48.  
  49. Now I find that hits is always zero.
  50.  
  51. Can anyone shed light on this problem?  I have gldebug'ed the program, and it
  52. runs clean (ie. no GL errors or warnings).
  53.  
  54. The setup:  Iris 4D/GT, IRIX 4.0.5
  55.  
  56. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  57. Andrew C. Beers                    abeers%iris%mfb@ubvms.cc.buffalo.edu
  58. Medical Foundation of Buffalo      beers@cs.buffalo.edu
  59.