RemoveEmptyNodesVisitor: remove redundant code for Geode handling

This commit is contained in:
scrawl 2017-01-20 20:57:03 +01:00
parent 255a86cbe2
commit 7611f95078
2 changed files with 0 additions and 18 deletions

View File

@ -360,7 +360,6 @@ class OSGUTIL_EXPORT Optimizer
RemoveEmptyNodesVisitor(Optimizer* optimizer=0):
BaseOptimizerVisitor(optimizer, REMOVE_REDUNDANT_NODES) {}
virtual void apply(osg::Geode& geode);
virtual void apply(osg::Group& group);
void removeEmptyNodes();

View File

@ -1329,23 +1329,6 @@ bool Optimizer::CombineStaticTransformsVisitor::removeTransforms(osg::Node* node
// RemoveEmptyNodes.
////////////////////////////////////////////////////////////////////////////
void Optimizer::RemoveEmptyNodesVisitor::apply(osg::Geode& geode)
{
for(int i=geode.getNumDrawables()-1;i>=0;--i)
{
osg::Geometry* geom = geode.getDrawable(i)->asGeometry();
if (geom && geom->empty() && isOperationPermissibleForObject(geom))
{
geode.removeDrawables(i,1);
}
}
if (geode.getNumParents()>0)
{
if (geode.getNumDrawables()==0 && isOperationPermissibleForObject(&geode)) _redundantNodeList.insert(&geode);
}
}
void Optimizer::RemoveEmptyNodesVisitor::apply(osg::Group& group)
{
if (group.getNumParents()>0)