Hi Mike,

What platform are you working on?  Does the jitter show up on standard
camera manipulators?

W.r.t differences, osgViewer has new event handling code on all
platforms as well as new Viewer code.  In general things should behave
roughly the same in regards to event handlers and manipulators in
osgViewer::Viewer vs osgProducer::Viewer, and testing before 2.0
didn't through up major issues.  With any new block of code there is
likely to be new bugs introduced, we just need to characterize them
and fix them.

Robert.

On 7/11/07, Dorsett, Mike F AMRDEC/SAIC <[EMAIL PROTECTED]> wrote:
Classification:  UNCLASSIFIED
Caveats: NONE

I had a similar problem with one of my manipulators when I upgraded to OSG 2.0.

I have a mouse model that will move at speed determined by the distance from 
where you clicked to where the pointer is residing.  I update velocities, 
directions, matricies, etc. during osgGA::MatrixManipulator::handle. If I just 
let the mouse sit, the movement is jittery. But, if I do subtle movements with 
the mouse, I get more ::handle calls, and the camera movement is smoother.

The thing is, it worked perfectly in 1.2 and I had been using a dt (in 1.2) 
between events to determine an appropriate velocity. But, now the dt range is 
very drastic. I get similar results as below with even some negative dts.  So, 
I can't use dt anymore or I will get even worse jumping.  I just wonder, why 
did this work with Producer, but not now?


Mike Dorsett - Software Engineer - SAIC


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED]
Sent: Wednesday, July 11, 2007 2:54 AM
To: osg-users@openscenegraph.net
Subject: RE: [osg-users] Events from the past


Hi André,

I think the problem is, if you do nothing with your window, handleNativeWindowingEvent() 
gets no events, causing _timeOfLastCheckEvents getting no updates, until you move your mouse 
again. Then you will get an "event from the past", i.e. with the old 
_timeOfLastCheckEvents instead of a fresh getEventQueue()->getTime(). If you keep your 
mouse moving everything is fine.

Tim.


-----Ursprüngliche Nachricht-----
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von André Garneau
Gesendet: Dienstag, 10. Juli 2007 18:28
An: 'osg users'
Betreff: RE: [osg-users] Events from the past

Hi Tim,

Correction: the getEventQueue()->getTime() method returns a time based on the timer, not 
the time set by the last EventQueue::frame() call, so my "two-frames behind" 
comment below is not valid. Sorry for the noise.

André

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of André Garneau
Sent: July-10-07 12:18 PM
To: 'osg users'
Subject: RE: [osg-users] Events from the past

Hi Tim,

Looking at the code, the EventsQueue::frame() method is called *after* the events 
are extracted from the graphics windows. So the event time appears to be two 
frames behind. It might be better therefore to use the current event time (i.e. 
getEventQueue()->getTime()) instead of the previous one, since the positioning 
of the EventsQueue::frame() call (which sets the new event
time) is already after the checkEvents() call. Hoping the above does not sound 
too confusing... :-)

As a test you could therefore try out this change:

Replace (in GraphicsWindowWin32::handleNativeWindowingEvent() )
-------

double baseTime   = _timeLastCheckEvents;
double eventTime  = _timeLastCheckEvents; double resizeTime = eventTime;

_timeOfLastCheckEvents = getEventQueue()->getTime();

By
--

_timeOfLastCheckEvents = getEventQueue()->getTime();

double baseTime   = _timeLastCheckEvents;
double eventTime  = _timeLastCheckEvents; double resizeTime = eventTime;

And see how you get on.

Perhaps Robert can confirm or deny this.

Hope this helps,

André

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED]
Sent: July-10-07 10:06 AM
To: osg-users@openscenegraph.net
Subject: Re: [osg-users] Events from the past


Hi André,

the manipulator jumps forward everytime I move the mouse. It is a typical 
manipulator, saving the last two GUIEventAdapters for calculating the dT.
Looking at a short recording of the views->EventQueue:

time: 8.949542 type: Frame
time: 8.833379 type: Mouse, time: 8.966164 type: Frame

you can see the first pair gives a negative dT, the second pair a relative large dT of 
about 0.13, causing the manipulator to "run like hell"...


Tim.


-----Ursprüngliche Nachricht-----
Von: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Im Auftrag von André Garneau
Gesendet: Dienstag, 10. Juli 2007 15:43
An: 'osg users'
Betreff: RE: [osg-users] Events from the past

Hi Tim,

You are right, the event time used to tag the time at which windowing events 
occurred is the time of the last check events. In reality, these events occurred 
in the time range [_timeOfLastCheckEvents, getEventQueue()->getTime()], so this 
is a valid time, albeit conservatively lagging behind. If we were to use the 
eventTime instead, that would also be a valid time, but this time possibly ahead 
of the real event time, so there is no perfect pick.

What kind of problem is that causing in your manipulator ?

André

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED]
Sent: July-10-07 5:50 AM
To: osg-users@openscenegraph.net
Subject: [osg-users] Events from the past


Hi,

I have some problems with my flightManipulator. Looking closer, the mouse 
events seem to be much older than the following frame event. After digging in 
the OSG source I found that the GraphicsWindowWin32 uses

eventTime = _timeOfLastCheckEvents;

instead of something like

eventTime = getEventQueue()->getTime();

Thanks for any answers/help/indoctrinations...

Tim.
_______________________________________________
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

_______________________________________________
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/
_______________________________________________
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

_______________________________________________
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

_______________________________________________
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/
_______________________________________________
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/
Classification:  UNCLASSIFIED
Caveats: NONE

_______________________________________________
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

_______________________________________________
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to