To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cad.dev.macOpen lugnet.cad.dev.mac in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / Development / Macintosh / 177
176  |  178
Subject: 
Re: mouse model manipulation
Newsgroups: 
lugnet.cad.dev.mac
Date: 
Wed, 12 Jun 2002 13:43:01 GMT
Viewed: 
2504 times
  
In lugnet.cad.dev.mac, Jim DeVona writes:
On Monday, June 10, 2002, at 10:09  PM, Don Heyse wrote:
Do you mean cursor doesn't disappear when you drag the mouse with the
button pressed?  It's supposed to.  That way you can't see it warp back
to the center of the window when it strays too far.  Or does the cursor
reappear when you leave the window?  It shouldn't do that either unless
the Mac has a really bad pointer focus policy.

The cursor does not disappear when the you drag the mouse with button
pressed. However, neither does it "warp" back to the center of the window
when it leaves the window - the cursor just moves as expected. (Although
since I don't know OpenGL or the ldglite code, perhaps there is an
internal program 'cursor' that you are referring to? In any case that is
not drawn, just the regular system cursor.) The actual mouse cursor does
not seem to behave strangely.

Ok based on this and the observation that the first tiny rotation seems
to be in the right direction I'm almost positive it's because the
glutWarpPointer function doesn't work.  I don't start warping the pointer
until you've moved 10 pixels.  But if the pointer doesn't jump to
the center of the window at that point then I'll be calculating the
wrong rotation.

Hmmm, according the the CVS logs I added the warping code just after
version 0.94.  Can anyone compare the two versions?  Or if the compiler
doesn't scare you, you can build a version of 0.95 that doesn't warp
the pointer by changing adding this one line of code to main.c.

  #define NOT_WARPING 1

Put this near the top of the file and recompile.  I suspect it'll fix
the problem.  If I recall, I added this hook while working on the DOS
version.  Initially the glutWarpPointer code in the DOS version of the
GLUT library was broken, but I eventually rewrote it and then disabled
the hook.  I'm not likely to try fixing the GLUT library on OSX because
I have no way to test it.  However if someone else with access to the
hardware wants to give it a shot that'd be great.  Actually there may
not be much to do.  Erik pointed out a patched version of GLUT for
OS X here:

  http://news.lugnet.com/cad/dev/mac/?n=117

According to the readme file, one of the changes was to fix the
glutWarpPointer function to "work as expected".  There are a lot of
other fixes.  I bet it would also fix many of the keyboard and mouse
button problems.

I guess I would say 180 degrees per half the window height... although
depending on the size of your window it might be more convenient to have
it absolutely defined. Any other opinions?

Actually I'm leaning toward 180 degrees per 200 pixels.  That way you
don't have to drag the mouse a mile when running in a large window.
Maybe I'll have a look at the ldview sources.  As far I know, everyone
is happy with the mouse sensitivity in that program.

Don



Message has 2 Replies:
  Re: mouse model manipulation
 
(...) What the heck, since it's a one liner I hopped onto the sourceforge compile farm and did it myself. For good luck I also added the 3 line ATI perspective mode fix. Grab the new executable at: (URL) it works, I'll update the web page to serve (...) (22 years ago, 12-Jun-02, to lugnet.cad.dev.mac)
  Re: mouse model manipulation
 
(...) I just use the magnitude of the mouse movement, and feed it in as the first argument to a glRotate call. I use the delta X and delta Y as the second and third arguments, and 0 as the final argument. Remember that the magnitude of the vector (...) (22 years ago, 15-Jun-02, to lugnet.cad.dev.mac)

Message is in Reply To:
  Re: mouse model manipulation
 
(...) The cursor does not disappear when the you drag the mouse with button pressed. However, neither does it "warp" back to the center of the window when it leaves the window - the cursor just moves as expected. (Although since I don't know OpenGL (...) (22 years ago, 11-Jun-02, to lugnet.cad.dev.mac)

66 Messages in This Thread:

















Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR