diff --git a/include/osgUtil/Optimizer b/include/osgUtil/Optimizer index 75328b933..4113f4589 100644 --- a/include/osgUtil/Optimizer +++ b/include/osgUtil/Optimizer @@ -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(); diff --git a/src/osgUtil/Optimizer.cpp b/src/osgUtil/Optimizer.cpp index 997ac55f2..31854ebbf 100644 --- a/src/osgUtil/Optimizer.cpp +++ b/src/osgUtil/Optimizer.cpp @@ -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)