Hi Lars, Thanks for change suggested change and test example that illustrates the issue.
I'm been poindering on whether removing an empty LOD/PageLOD child is a problem or not, I'm my current leaning is towards it not being a problem in most cases as there is little point in having an empty subgraph as a child of an LOD. In the case of PagedLOD when you have a child that can be an external file, and so you set the filename for a given LOD range then if optimize the scene graph you'd expect that either the external file hasn't been loaded, in which case the RemoveRedundentNodesVisitor won't make an difference to the PagedLOD, or that the external file subgraph has be loaded and assigned to the PageLOD, in which case you'd expect it to be not empty, and it it were then just like in the straight LOD case there isn't any point in it. For you application my guess is that you probably shouldn't assign the PageLOD external subgraph prior to optimization and writing out, rather prepare the database how it should be saved on disk and then write it out. If this doesn't fit with what you can do then could you explain how the problem has arrisen at your end. Robert. On Wed, Mar 9, 2011 at 10:39 AM, Nilsson Lars <[email protected]> wrote: > Hi Robert > > > > I have noticed that Optimizer with option REMOVE_REDUNDANT_NODES removes > children to PagedLOD > > containing filenames instead of geometry. Is this a bug or an expected > behavior? > > The attached program (test.cpp) illustrates what I am trying to describe. > > > > One line is added to Optimizer.cpp to fix my problem. The code is from OSG > 2.9.6. > > > > Regards, > > > > Lars Nilsson > > > > _______________________________________________ > 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
