Commit 24ae9f4a authored by scrawl's avatar scrawl
Browse files

Remove no longer needed apply(Geode&) in SetFilterSettingsVisitor and NodeToShapeVisitor

In OSG 3.4 (which is now a requirement), Drawables are normal Nodes attached in the scene graph. Geode is still provided for backwards compatibility, but does not need to be specially handled here because it now functions just like a normal Group node.
parent e8caafa1
#include "bulletshapemanager.hpp"
#include <osg/NodeVisitor>
#include <osg/Geode>
#include <osg/TriangleFunctor>
#include <osg/Transform>
#include <osg/Drawable>
#include <BulletCollision/CollisionShapes/btTriangleMesh.h>
......@@ -62,12 +63,6 @@ public:
}
virtual void apply(osg::Geode& geode)
{
for (unsigned int i=0; i<geode.getNumDrawables(); ++i)
apply(*geode.getDrawable(i));
}
virtual void apply(osg::Drawable &drawable)
{
if (!mTriangleMesh)
......
......@@ -2,7 +2,6 @@
#include <iostream>
#include <osg/Node>
#include <osg/Geode>
#include <osg/UserDataContainer>
#include <osgParticle/ParticleSystem>
......@@ -51,7 +50,6 @@ namespace
&& partsys->getUserDataContainer()->getDescriptions()[0] == "worldspace");
}
// in OSG 3.3 and up Drawables can be directly in the scene graph without a Geode decorating them.
void apply(osg::Drawable& drw)
{
if (osgParticle::ParticleSystem* partsys = dynamic_cast<osgParticle::ParticleSystem*>(&drw))
......@@ -145,21 +143,6 @@ namespace Resource
traverse(node);
}
virtual void apply(osg::Geode& geode)
{
osg::StateSet* stateset = geode.getStateSet();
if (stateset)
applyStateSet(stateset);
for (unsigned int i=0; i<geode.getNumDrawables(); ++i)
{
osg::Drawable* drw = geode.getDrawable(i);
stateset = drw->getStateSet();
if (stateset)
applyStateSet(stateset);
}
}
void applyStateSet(osg::StateSet* stateset)
{
const osg::StateSet::TextureAttributeList& texAttributes = stateset->getTextureAttributeList();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment