예제 #1
0
void StatsVisitor::apply(osg::Switch& node)
{
    if (node.getStateSet())
    {
        apply(*node.getStateSet());
    }

    ++_numInstancedSwitch;
    _switchSet.insert(&node);

    traverse(node);
}
예제 #2
0
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();
}
예제 #3
0
void
FltExportVisitor::apply( osg::Switch& node )
{
    _firstNode = false;
    ScopedStatePushPop guard( this, node.getStateSet() );

    writeSwitch( &node );

    writeMatrix( node.getUserData() );
    writeComment( node );
    writePushTraverseWritePop( node );
}