Converted osgGA::GUIEventAdapter into a concrete class capable of respresenting
keyboard and mouse events. Added osgGA::EventQueue class to support a thread safe event queue and adaption of keyboard and mouse events. Removed osgProducer::EventAdapter as GUIEventAdapter replaces it. Adapted osgProducer and examples to work with the new changes to osgGA.
This commit is contained in:
@@ -54,7 +54,7 @@ void TrackballManipulator::home(double /*currentTime*/)
|
||||
|
||||
void TrackballManipulator::home(const GUIEventAdapter& ea ,GUIActionAdapter& us)
|
||||
{
|
||||
home(ea.time());
|
||||
home(ea.getTime());
|
||||
us.requestRedraw();
|
||||
}
|
||||
|
||||
@@ -167,7 +167,7 @@ bool TrackballManipulator::isMouseMoving()
|
||||
float dx = _ga_t0->getXnormalized()-_ga_t1->getXnormalized();
|
||||
float dy = _ga_t0->getYnormalized()-_ga_t1->getYnormalized();
|
||||
float len = sqrtf(dx*dx+dy*dy);
|
||||
float dt = _ga_t0->time()-_ga_t1->time();
|
||||
float dt = _ga_t0->getTime()-_ga_t1->getTime();
|
||||
|
||||
return (len>dt*velocity);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user