#include #include #include #include static bool checkChildren( const osg::Group& node ) { return node.getNumChildren()>0; } static bool readChildren( osgDB::InputStream& is, osg::Group& node ) { unsigned int size = 0; is >> size >> osgDB::BEGIN_BRACKET; for ( unsigned int i=0; i obj = is.readObject(); osg::Node* child = dynamic_cast( obj.get() ); if ( child ) node.addChild( child ); } is >> osgDB::END_BRACKET; return true; } static bool writeChildren( osgDB::OutputStream& os, const osg::Group& node ) { unsigned int size = node.getNumChildren(); os << size << osgDB::BEGIN_BRACKET << std::endl; for ( unsigned int i=0; i