Re: [osg-users] How to detect scene changes?
HI Ale, On 4 November 2013 17:43, Ale Maro sash...@teletu.it wrote: At the moment the only part I have not separated from osg layer are transformations so I will need to modify manipulators. The camera manipulators only modify the viewer's Camera's view matrix, and then it's only be the viewer pulling the values and setting them, which you can override by subclassing from Viewer if you so wish. They don't effect the scene graph. The osgManipulator's can modify the scene graph but there is a callback mechanism there which you could use to watch for changes. Other parts of the OSG like osgParticle, osgAnimation and transform callbacks don't provide a mechanism to track changes, but they are self contained and you may not need to track the changes. It really depends upon what you need to track changes for. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] How to detect scene changes?
Hi, I am trying to find a way to detect any changes of the scene graph automatically? I would like to implement an undo/redo mechanism and also I would like to know when my scene changes and needs to be saved. For example I would like a callback is called when a manipulator changes a transformation node (avoiding modification on manipulators) Is there something already implemented in OSG that can help me? Thank you! Cheers, Ale -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=57063#57063 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How to detect scene changes?
Hi Ale, There is no such capability built-in. You need to build your own layer on top to manage changes to the scene graph. You should write your own manipulator (or modify an existing one) to route changes through your change management layer, rather than having it change the underlying transform node directly. I have found the best practice is to treat osg as just the display layer it is intended to be, and not to try and use it as your application's primary data model. Good luck, Peter On 11/4/2013 10:02 AM, Ale Maro wrote: Hi, I am trying to find a way to detect any changes of the scene graph automatically? I would like to implement an undo/redo mechanism and also I would like to know when my scene changes and needs to be saved. For example I would like a callback is called when a manipulator changes a transformation node (avoiding modification on manipulators) Is there something already implemented in OSG that can help me? Thank you! Cheers, Ale -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=57063#57063 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Peter Amstutz Senior Software Engineer Technology Solutions Experts Natick, MA 02131 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How to detect scene changes?
Hi Peter, thanks for the reply. At the moment the only part I have not separated from osg layer are transformations so I will need to modify manipulators. Cheers, Ale -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=57065#57065 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org