#include #include #include #include static bool checkLayers( const osgVolume::CompositeLayer& layer ) { return layer.getNumLayers()>0; } static bool readLayers( osgDB::InputStream& is, osgVolume::CompositeLayer& layer ) { unsigned int size = 0; is >> size >> is.BEGIN_BRACKET; for ( unsigned int i=0; i( is.readObject() ); if ( child ) layer.addLayer( child ); } is >> is.END_BRACKET; return true; } static bool writeLayers( osgDB::OutputStream& os, const osgVolume::CompositeLayer& layer ) { unsigned int size = layer.getNumLayers(); os << size << os.BEGIN_BRACKET << std::endl; for ( unsigned int i=0; i