#include #include #include #include static bool checkParticleSystems( const osgParticle::ParticleSystemUpdater& updater ) { return updater.getNumParticleSystems()>0; } static bool readParticleSystems( osgDB::InputStream& is, osgParticle::ParticleSystemUpdater& updater ) { unsigned int size = 0; is >> size >> is.BEGIN_BRACKET; for ( unsigned int i=0; i ps = is.readObjectOfType(); if ( ps ) updater.addParticleSystem( ps.get() ); } is >> is.END_BRACKET; return true; } static bool writeParticleSystems( osgDB::OutputStream& os, const osgParticle::ParticleSystemUpdater& updater ) { unsigned int size = updater.getNumParticleSystems(); os << size << os.BEGIN_BRACKET << std::endl; for ( unsigned int i=0; i