OpenSceneGraph Forum Forum Index OpenSceneGraph Forum
Official forum which mirrors the existent OSG mailing lists. Messages posted here are forwarded to the mailing list and vice versa.
 
   FAQFAQ    SearchSearch    MemberlistMemberlist    RulesRules    UsergroupsUsergroups    RegisterRegister 
 Mail2Forum SettingsMail2Forum Settings  ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
   AlbumAlbum  OpenSceneGraph IRC ChatOpenSceneGraph IRC Chat   SmartFeedSmartFeed 

Order of event handler evaluation, docs?


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General
View previous topic :: View next topic  
Author Message
James Turner
Guest





PostPosted: Sun Jan 07, 2018 1:22 pm    Post subject:
Order of event handler evaluation, docs?
Reply with quote

Hi,

Is there any documentation on the order in which osgGA::EventHandlers are invoked for a particular (mouse event)?

I’m working on code which has a mixture of handlers set on the Viewer (i.e global) but also others attached to geodes and drawables within the scene. I’d ideally like to have /some/ global handlers executed before the handlers on nodes are considered, but it seems as if by default the global handlers are all executed after them?

(I need to do some filtering of events in certain mouse modes, before the nodes get a chance to do their various things)

Again not necessarily looking for a complete explanation, just a point to any relevant docs.

Kind regards,
James



------------------
Post generated by Mail2Forum
Back to top
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 12094

PostPosted: Sun Jan 07, 2018 4:17 pm    Post subject:
Order of event handler evaluation, docs?
Reply with quote

Hi James,

You have complete control of the event order if you want it, you just
need to subclass from
osgViewer:Viewer/CompositeViewer:eventTraversal() and do what you
want, or just doing your own implementation of the frame loop.

The best illustration of what the osgViewer is doing w.r.t event order
is to read the osgViewer::Viewer::eventTraversal() implementation in
src/osgViewer/Viewer.cpp.

Robert.

On 7 January 2018 at 13:19, James Turner <> wrote:
Quote:
Hi,

Is there any documentation on the order in which osgGA::EventHandlers are invoked for a particular (mouse event)?

I’m working on code which has a mixture of handlers set on the Viewer (i.e global) but also others attached to geodes and drawables within the scene. I’d ideally like to have /some/ global handlers executed before the handlers on nodes are considered, but it seems as if by default the global handlers are all executed after them?

(I need to do some filtering of events in certain mouse modes, before the nodes get a chance to do their various things)

Again not necessarily looking for a complete explanation, just a point to any relevant docs.

Kind regards,
James




------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Similar Topics
Topic Author Forum Replies Posted
No new posts how to interpret values shown by stat... wernerM General 2 Tue Jul 17, 2018 9:43 am View latest post
No new posts Draw two translucent geometries in sp... krikr42 General 8 Fri May 18, 2018 1:42 pm View latest post
No new posts Matrix multiplication order Flogo General 3 Thu Mar 22, 2018 9:53 am View latest post
No new posts rendering order Gianluca Natale General 0 Mon Oct 23, 2017 5:09 pm View latest post
No new posts Passing input to viewer/camera (using... antiro42 General 2 Sat Sep 16, 2017 11:07 am View latest post


Board Security Anti Bot Question MOD - phpBB MOD against Spam Bots
Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP