Further improvements in p3d plugin
This commit is contained in:
@@ -632,7 +632,7 @@ SlideEventHandler::SlideEventHandler(osgViewer::Viewer* viewer):
|
||||
_updateOpacityActive(false),
|
||||
_previousX(0), _previousY(0),
|
||||
_cursorOn(true),
|
||||
_releaseAndCompileOnEachNewSlide(true),
|
||||
_releaseAndCompileOnEachNewSlide(false),
|
||||
_firstSlideOrLayerChange(true),
|
||||
_tickAtFirstSlideOrLayerChange(0),
|
||||
_tickAtLastSlideOrLayerChange(0),
|
||||
@@ -729,6 +729,25 @@ double SlideEventHandler::getCurrentTimeDelayBetweenSlides() const
|
||||
}
|
||||
|
||||
|
||||
void SlideEventHandler::operator()(osg::Node* node, osg::NodeVisitor* nv)
|
||||
{
|
||||
osgGA::EventVisitor* ev = dynamic_cast<osgGA::EventVisitor*>(nv);
|
||||
if (ev)
|
||||
{
|
||||
if (node->getNumChildrenRequiringEventTraversal()>0) traverse(node,nv);
|
||||
|
||||
if (ev->getActionAdapter() && !ev->getEvents().empty())
|
||||
{
|
||||
for(osgGA::EventQueue::Events::iterator itr = ev->getEvents().begin();
|
||||
itr != ev->getEvents().end();
|
||||
++itr)
|
||||
{
|
||||
handleWithCheckAgainstIgnoreHandledEventsMask(*(*itr), *(ev->getActionAdapter()), node, nv);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool SlideEventHandler::handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIActionAdapter& aa)
|
||||
{
|
||||
|
||||
|
||||
@@ -95,6 +95,9 @@ public:
|
||||
|
||||
virtual void accept(osgGA::GUIEventHandlerVisitor& v) { v.visit(*this); }
|
||||
|
||||
/** Event traversal node callback method.*/
|
||||
virtual void operator()(osg::Node* node, osg::NodeVisitor* nv);
|
||||
|
||||
virtual bool handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIActionAdapter&);
|
||||
|
||||
virtual void getUsage(osg::ApplicationUsage& usage) const;
|
||||
|
||||
Reference in New Issue
Block a user