home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cis.ohio-state.edu!rutgers!ub!acsu.buffalo.edu!beers
- From: beers@acsu.buffalo.edu (Andrew Beers)
- Newsgroups: comp.sys.sgi
- Subject: picking and gselecting...
- Message-ID: <BtxFHK.5wL@acsu.buffalo.edu>
- Date: 2 Sep 92 01:15:19 GMT
- Sender: nntp@acsu.buffalo.edu
- Organization: State University of New York at Buffalo/Comp Sci
- Lines: 47
- Nntp-Posting-Host: pegasus.cs.buffalo.edu
-
-
- Does picking or selecting mode work with non-orthographic viewing
- transformations? If so, I am having a terrible time getting it to work. I
- have experimented for a while, read example programs (all of which use
- ortho2), and RTFM.
-
- This is what I'm trying to do:
-
- I'm drawing a cube (or most of a cube) on the screen and would like to pick a
- corner of it by clicking it with the mouse. I issue some viewing
- transformations:
-
- mmode(MPROJECTION);
- window(-150,150,-150,150,-600,500);
- mmode(MVIEWING);
- lookat(0,0,-750,0,0,0,0);
-
- then draw the figure to see it on the screen.
-
- drawit(1);
-
- Following the example programs and the documentation, I then re-issue my
- transformations and enter gselect mode:
-
- picksize(50,50);
- mmode(MPROJECTION);
- window(-150,150,-150,150,-500,500);
- mmode(MVIEWING);
- lookat(0,0,-750,0,0,0,0);
- gselect(buffer, BUFSIZE);
-
- redraw the figure (loading and pushing names on the name stack) , and end
- selecting mode:
-
- drawit(0); /* no actual drawing takes place */
- hits = endselect(buffer);
-
- Now I find that hits is always zero.
-
- Can anyone shed light on this problem? I have gldebug'ed the program, and it
- runs clean (ie. no GL errors or warnings).
-
- The setup: Iris 4D/GT, IRIX 4.0.5
-
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Andrew C. Beers abeers%iris%mfb@ubvms.cc.buffalo.edu
- Medical Foundation of Buffalo beers@cs.buffalo.edu
-