Пример #1
0
	virtual void apply(osg::Geode& node)
	{
		for (int i=0;i<_indent;++i)
		{
			std::cout<<"  ";
		}
		std::cout<<"["<<_indent+1<<"]"<<node.libraryName()
			<<"::"<<node.className()<<std::endl;
		for (unsigned int n=0;n<node.getNumDrawables();++n)
		{
			osg::Drawable *drawable=node.getDrawable(n);
			if(!drawable)continue;
			for (int i=0;i<_indent;++i)
			{
				for (int i=0;i<_indent;++i)
				{
					std::cout<<"  ";
				}
				std::cout<<drawable->libraryName()<<"::"
					<<drawable->className()<<std::endl;
			}
			_indent++;
			traverse(node);
			_indent--;
		}
	
	}
Пример #2
0
 void InfoVisitor::apply(osg::Geode& geode)
 {
     std::cout << spaces() << geode.libraryName() << "::" << geode.className() << std::endl;
     ++_level;
     osg::Drawable* drawable = nullptr;
     for (size_t i = 0; i < geode.getNumDrawables(); ++i)
     {
         drawable = geode.getDrawable(i);
         std::cout << spaces() << drawable->libraryName() << "::" << drawable->className() << std::endl;
     }
     traverse(geode);
     --_level;
 }
Пример #3
0
    virtual void apply(osg::Geode& geode)
    {
        std::cout
            << spaces()
            << geode.libraryName()
            << "::"
            << geode.className()
            << std::endl;

        level_++;
        for (unsigned int i = 0; i < geode.getNumDrawables(); ++i)
        {
            osg::Drawable* drawable = geode.getDrawable(i);
            std::cout
                << spaces()
                << drawable->libraryName()
                << "::"
                << drawable->className()
                << std::endl;
        }

        traverse(geode);
        level_--;
    }