Hi Ralf, osg-submissions is for actual code changes/fixes not general discussion, the best place for this on osg-users mailing list/forum. Could you repost on osg-users and I'll answer there.
Thanks, Robert On 14 August 2017 at 08:06, Ralf Habacker <[email protected]> wrote: > Hi, > > for > http://www.openscenegraph.org/index.php/gallery/use-cases/189-fm-profil > we are trying to add animation trigger support to the scene by a > specific plugins. Animation trigger support means to start an animation > if the user clicks a specific object. The recent implementation uses a > dedicated pick handler to be called if a user selects an object and > starts an animation by using the preset class > AnimationViewerModelController. The connection between the trigger > object and the related animation has been designed by using a specific > object name postfix including the animation name to make the pick > handler to find the related animation. The animation itself is created > with blender and exported with the osgexport plugin > (https://github.com/cedricpinson/osgexport). > > The pick handler needs to be added to the viewer, which is normally > instantiated in the main application. Because we need to support several > viewers and we do not want to patch all related viewer (some of them are > 3rdparty like https://github.com/ChrisDenham/osgopenvrviewer) we are > looking for a way to place all this mentioned stuff into an osg plugin, > which could be loaded by any viewer by appending the plugin extension > (which is animtrigger) to the model files e.g. osgviewer > test.osgt.animtrigger. > > The mentioned pick handler needs to be added to the viewer like shown below > > AnimationPickHandler *pickHandler = new AnimationPickHandler(); > viewer->addEventHandler(pickHandler); > > To have it in a plugin the plugin needs access to the global viewer > instances, which is not possible with recent code and I'm looking for a > way to add such support to osg. > > From my recent osg knowledge I would say that one of the available > viewer classes needs to be extended to register itself into some global > accessable list or "viewer manager" class. > > Are there any hints for implementing this ? > > Regards > Ralf > > > > > _______________________________________________ > osg-submissions mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg- > submissions-openscenegraph.org >
_______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
