On Fri, 2006-09-29 at 14:04 -0700, Don Burns wrote:
> Hi Robert and welcome back!
> 
> I'm seeing the problem in osgviewer (I haven't tried the others), but
> indeed the code you indicate below is where the problem was first
> introduced.  When I comment this out things work.  However, I did
> notice that sometimes after window size changes the origin of the
> mouseX and mouseY.  
> 
> After pounding on it for a while, I think I found the problem.  You
> are passing the Windows size (1280x1024) to setInputRange() in
> GUIEventAdapter::setWindowRectangle().  I believe the input range
> expects to be something like -1, -1, 1, 1, not 0, 0, 1280, 1024 

I commented out just this line as well and things seem to be working
okay. Would dividing by the max size for each value do the trick then?
(Well, probably not, since there's a floor value of -1, which kinda'
confuses me)

> -don
> 
> On 9/29/06, Robert Osfield <[EMAIL PROTECTED]> wrote:
>         On 9/29/06, Don Burns <[EMAIL PROTECTED]> wrote:
>                 Ah, yes! finally someone else who has seen the
>                 problem.  The problem is not, actually, that the there
>                 is no response, but that the response is so minimal
>                 that you are not seeing much change on the screen.  It
>                 is a scaling issue with mouse positions.
>         
>         Which examples have a problem?  I haven't seen this problem,
>         and just checked to see if everything is checked in and it
>         looks ok.
>         
>         
>                 I've tracked this down to a new (I think new)
>                 updateWindowSIze() method in
>                 osgProducer::KeyboardMouseCallback.  This is called in
>                 every single method of the class, and goes to great
>                 lengths to recreate what is already available from
>                 Producer::InputArea:;getExtents(), so I'm not sure
>                 what the intent is there.  I simply put a return
>                 statement at the top of the updateWindowSize() method
>                 and things seem to be back to (almost normal).  
>         
>         KeyboardMouseCallback::updateWindowSize() has been around for
>         a very long time.  The only change to it has been the addition
>         of the lines at the end of the function:
>         
>             if (rs) 
>             {
>                 ea->setWindowRectangle(rs->getWindowOriginX(),
>         rs->getWindowOriginY(),
>         rs->getWindowWidth(),rs->getWindowHeight());
>             }
>         
>         W.r.t input area extents, I'm afraid I can't recall why I
>         added all the input area code, perhaps it was something
>         missing from Producer::InputArea when I first wrote, or
>         perhaps it didn't have the correct behavior.  This input area
>         is original and hasn't changed with the new addition of the
>         lines above.  There also still needs to be a fallback for when
>         no input area is required. 
>         
>                 Robert is still busy and probably won't get caught up
>                 on the backlog until next week, but the above should
>                 get you up and running in the mean time.
>         
>         I am back earlier than planned so will be able to do some work
>         over this weekend.  Right now I'm just trying to catch up on
>         urgent mail.
>         
>         Robert.
>         
>         
>         _______________________________________________
>         osg-users mailing list
>         [email protected] 
>         http://openscenegraph.net/mailman/listinfo/osg-users
>         http://www.openscenegraph.org/
>         
> 
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://openscenegraph.net/mailman/listinfo/osg-users
> http://www.openscenegraph.org/

_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to