00001 //----------------------------------------------------------------------------------- 00002 // 00003 // Pro-Vocation Light Engine (PVLE) 00004 // Copyright (C) 2007-2009 Sukender, KinoX & Buzib 00005 // For more information, contact us : sukender@free.fr 00006 // 00007 // This program is free software; you can redistribute it and/or modify 00008 // it under the terms of the GNU General Public License as published by 00009 // the Free Software Foundation; either version 3 of the License, or 00010 // (at your option) any later version. 00011 // 00012 // For any use that is not compatible with the terms of the GNU 00013 // General Public License, please contact the authors for alternative 00014 // licensing options. 00015 // 00016 // This program is distributed in the hope that it will be useful, 00017 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00018 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00019 // GNU General Public License for more details. 00020 // 00021 // You should have received a copy of the GNU General Public License along 00022 // with this program; if not, write to the Free Software Foundation, Inc., 00023 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 00024 // 00025 //----------------------------------------------------------------------------------- 00026 00029 00030 #ifndef OSGPARTICLE_AUTOPARTICLESYSTEMUPDATER 00031 #define OSGPARTICLE_AUTOPARTICLESYSTEMUPDATER 1 00032 00033 #include <PVLE/Export.h> 00034 #include <osgParticle/ParticleSystemUpdater> 00035 #include <osg/Geode> 00036 00037 namespace osgParticle 00038 { 00045 class PVLE_EXPORT AutoParticleSystemUpdater : public osgParticle::ParticleSystemUpdater { 00046 public: 00047 AutoParticleSystemUpdater(); 00048 AutoParticleSystemUpdater(const AutoParticleSystemUpdater& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY); 00049 00050 META_Node(osgParticle,AutoParticleSystemUpdater); 00051 00053 virtual bool addParticleSystem(ParticleSystem* ps); 00054 00056 virtual bool removeParticleSystem(unsigned int i, unsigned int numParticleSystemsToRemove=1); 00057 00059 virtual bool setParticleSystem( unsigned int i, ParticleSystem* ps ); 00060 00061 virtual void traverse(osg::NodeVisitor& nv); 00062 00063 protected: 00064 virtual ~AutoParticleSystemUpdater() {} 00065 AutoParticleSystemUpdater &operator=(const AutoParticleSystemUpdater &) { return *this; } 00066 osg::ref_ptr<osg::Geode> pGeode; // PVLE 00067 00068 private: 00069 typedef std::vector<bool> ParticleSystemData_Vector; // PVLE - bool indicates if can be deleted 00070 00071 ParticleSystemData_Vector _psdata; 00072 }; 00073 } 00074 00075 #endif