Re: [osg-users] In readNode, find the parent node that will be merged into
Hi Craig, Could you not do the update as a lazy operation, i.e. what for an update traversal to traverse the scene graph and then update it then as the update traversal NodeVisitor will have the whole parental path. The osgTerrain::TerrainTile::traverse() implementation found in src/osgTerrain/TerrainTile.cpp does something similar to this for finding the Terrain node that it's enclosed within. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] In readNode, find the parent node that will be merged into
Hi, I'm working on a feature that requires modifying a scene graph after it's been loaded, including those that may be loaded from the DatabasePager. Unfortunately the process depends on any ancestor transforms that may be present in the graph that the node may be merged into. I've looked (at some length) at both a ReadFileCallback and pseudo-loader plugin as implementation options, however neither appears to provide any way of 'seeing' whether a readNode request comes from the DatabasePager or elsewhere, and if it does, where it will end up in the rendered scene graph. Am I missing something obvious that would help in this situation? Otherwise I may look at modifying OSG to pass a reference to the parent node in the ReaderWriter Options or something similar. Thanks! Craig Bosma ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] In readNode, find the parent node that will be merged into
On 9/6/2011 12:33 PM, Craig S. Bosma wrote: Hi, I'm working on a feature that requires modifying a scene graph after it's been loaded, including those that may be loaded from the DatabasePager. Unfortunately the process depends on any ancestor transforms that may be present in the graph that the node may be merged into. I've looked (at some length) at both a ReadFileCallback and pseudo-loader plugin as implementation options, however neither appears to provide any way of 'seeing' whether a readNode request comes from the DatabasePager or elsewhere, and if it does, where it will end up in the rendered scene graph. Am I missing something obvious that would help in this situation? Otherwise I may look at modifying OSG to pass a reference to the parent node in the ReaderWriter Options or something similar. You could attach the parent node address (or the full NodePath for that matter) as UserData to your ReadFileCallback instance. -Paul ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] In readNode, find the parent node that will be merged into
Thanks Paul, That's a helpful suggestion, but wouldn't it still require the DatabasePager to be modified to also stash the parent node/nodepath in the read node's UserData, since the callback won't know when a read comes from the pager? Craig On Sep 6, 2011, at 1:57 PM, Paul Martz wrote: On 9/6/2011 12:33 PM, Craig S. Bosma wrote: Hi, I'm working on a feature that requires modifying a scene graph after it's been loaded, including those that may be loaded from the DatabasePager. Unfortunately the process depends on any ancestor transforms that may be present in the graph that the node may be merged into. I've looked (at some length) at both a ReadFileCallback and pseudo-loader plugin as implementation options, however neither appears to provide any way of 'seeing' whether a readNode request comes from the DatabasePager or elsewhere, and if it does, where it will end up in the rendered scene graph. Am I missing something obvious that would help in this situation? Otherwise I may look at modifying OSG to pass a reference to the parent node in the ReaderWriter Options or something similar. You could attach the parent node address (or the full NodePath for that matter) as UserData to your ReadFileCallback instance. -Paul ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org