StateVisitor: remove redundant code for Geode handling

This commit is contained in:
scrawl 2017-01-20 22:49:17 +01:00
parent f229b19496
commit 833f37ea57
2 changed files with 0 additions and 34 deletions

View File

@ -460,8 +460,6 @@ class OSGUTIL_EXPORT Optimizer
virtual void apply(osg::Node& node);
virtual void apply(osg::Geode& geode);
void optimize();
protected:

View File

@ -461,38 +461,6 @@ void Optimizer::StateVisitor::apply(osg::Node& node)
traverse(node);
}
void Optimizer::StateVisitor::apply(osg::Geode& geode)
{
if (!isOperationPermissibleForObject(&geode)) return;
osg::StateSet* ss = geode.getStateSet();
if (ss && ss->getDataVariance()==osg::Object::STATIC)
{
if (isOperationPermissibleForObject(ss))
{
addStateSet(ss,&geode);
}
}
for(unsigned int i=0;i<geode.getNumDrawables();++i)
{
osg::Drawable* drawable = geode.getDrawable(i);
if (drawable)
{
ss = drawable->getStateSet();
if (ss && ss->getDataVariance()==osg::Object::STATIC)
{
if (isOperationPermissibleForObject(drawable) &&
isOperationPermissibleForObject(ss))
{
addStateSet(ss,drawable);
}
}
}
}
}
void Optimizer::StateVisitor::optimize()
{
OSG_INFO << "Num of StateSet="<<_statesets.size()<< std::endl;