]> git.mxchange.org Git - simgear.git/blobdiff - simgear/scene/material/EffectCullVisitor.cxx
Random buildings - initial commit.
[simgear.git] / simgear / scene / material / EffectCullVisitor.cxx
index 8f7637c94bb35b5c40624eea0c618d0fea46cc0f..c44d8d695c1cf086ba42793030a2d829c71f2db1 100644 (file)
@@ -20,7 +20,6 @@
 
 #include <osg/StateSet>
 #include <osg/Texture2D>
-#include <osg/LOD>
 
 #include "EffectCullVisitor.hxx"
 
@@ -35,23 +34,14 @@ namespace simgear
 
 using osgUtil::CullVisitor;
 
-EffectCullVisitor::EffectCullVisitor() :
-    _ignoreLOD(false),
-    _collectLights(false)
-{
-}
-
-EffectCullVisitor::EffectCullVisitor(bool ignoreLOD, bool collectLights) :
-    _ignoreLOD(ignoreLOD),
+EffectCullVisitor::EffectCullVisitor(bool collectLights) :
     _collectLights(collectLights)
 {
 }
 
 EffectCullVisitor::EffectCullVisitor(const EffectCullVisitor& rhs) :
     osg::Referenced(rhs),
-    CullVisitor(rhs),
-    _ignoreLOD(rhs._ignoreLOD),
-    _collectLights(rhs._collectLights)
+    CullVisitor(rhs)
 {
 }
 
@@ -60,30 +50,6 @@ CullVisitor* EffectCullVisitor::clone() const
     return new EffectCullVisitor(*this);
 }
 
-void EffectCullVisitor::apply(osg::LOD& node)
-{
-    if (_ignoreLOD) {
-        if (isCulled(node)) return;
-
-        // push the culling mode.
-        pushCurrentMask();
-
-        // push the node's state.
-        osg::StateSet* node_state = node.getStateSet();
-        if (node_state) pushStateSet(node_state);
-
-        if (_traversalMode==TRAVERSE_PARENTS) node.osg::Group::ascend(*this);
-        else if (_traversalMode!=TRAVERSE_NONE) node.osg::Group::traverse(*this);
-        // pop the node's state off the render graph stack.
-        if (node_state) popStateSet();
-
-        // pop the culling mode.
-        popCurrentMask();
-    }
-    else
-        CullVisitor::apply(node);
-}
-
 void EffectCullVisitor::apply(osg::Geode& node)
 {
     if (isCulled(node))