void StatsVisitor::apply(osg::Switch& node) { if (node.getStateSet()) { apply(*node.getStateSet()); } ++_numInstancedSwitch; _switchSet.insert(&node); traverse(node); }
void CountsVisitor::apply(osg::Switch& node) { pushStateSet(node.getStateSet()); _switches++; osg::ref_ptr<osg::Object> rp = (osg::Object*)&node; _uSwitches.insert(rp); _totalChildren += node.getNumChildren(); apply(node.getStateSet()); if (++_depth > _maxDepth) _maxDepth = _depth; traverse((osg::Node&)node); _depth--; popStateSet(); }
void FltExportVisitor::apply( osg::Switch& node ) { _firstNode = false; ScopedStatePushPop guard( this, node.getStateSet() ); writeSwitch( &node ); writeMatrix( node.getUserData() ); writeComment( node ); writePushTraverseWritePop( node ); }