Hi Stefan, I haven't taken the OSG this route before as the API's associated with a complete state change observer systems would be a significant expansion of the OSG API. This type of feature is only useful to a small number of users so all users would have to pay for this API and the CPU overhead with it. There will also be an ongoing maintence issue keeping the OberseverRecord's insync with the API.
I don't feel the benefits vs costs warrants the introduction of this feature. One alternative route to low level support for tracking scene graph state changes is move the state change to an serialization based interface to the scene graph. So rather than modify the scene graph directly via the C++ methods to the objects directly you utilize the osgDB::ClassInterface to get/set properties of scene graph objects, and when you pass this data across it's in a generalized form. You then can register observers with the interface object that watches set of scene graph objects and specific properties that the observers are interested in. Robert On 22 May 2015 at 20:02, Stefan Zellmann <[email protected]> wrote: > Dear Robert, > > in a discussion a while ago > (http://forum.openscenegraph.org/viewtopic.php?t=14721) I asked if general > changes to the scene graph can be monitored in a rather generic fashion. > > I now started to enhance the osg::Observer class so that it may not only be > used to monitor deletion, but also state changes. > The feature is far from complete, I implemented it for Matrix / > PositionAttituteTransform and for modifications to Group's children list. At > this early stage, I'd now like to ask you if you would have a look at it to > decide if the approach is suitable at all. Being able to monitor the scene > graph is a rather important feature to us. But then, it is only useful to us > if it eventually goes into the official repos. If you don't find it > suitable, what alternative approach would you suggest? > > I added an "osgobserver" example which demonstrates how one should use the > feature (the example needs C++11 for I feel that we're not going to keep it, > anyway. Please tell me if that's a problem). > > If you find this useful, I'd be glad to put some more effort into it to make > the feature more complete. > > For the time being I designed this for backwards compatibility, but I > believe that interface changes (e.g. implementing osg::Observer as a > template) could simplify the way the feature is used. There may however be > caveats to this. > > As far as this may apply yet: I don't require to retain the copyright. > > Best regards, > Stefan > > > > _______________________________________________ > 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
