#include #include #include #include static bool checkChildren( const osg::CompositeShape& shape ) { return shape.getNumChildren()>0; } static bool readChildren( osgDB::InputStream& is, osg::CompositeShape& shape ) { unsigned int size = 0; is >> size >> is.BEGIN_BRACKET; for ( unsigned int i=0; i child = is.readObjectOfType(); if ( child ) shape.addChild( child ); } is >> is.END_BRACKET; return true; } static bool writeChildren( osgDB::OutputStream& os, const osg::CompositeShape& shape ) { unsigned int size = shape.getNumChildren(); os << size << os.BEGIN_BRACKET << std::endl; for ( unsigned int i=0; i