// Copyright (C) 2002-2003 Gideon May (gideon@computer.org) // // Permission to copy, use, sell and distribute this software is granted // provided this copyright notice appears in all copies. // Permission to modify the code and to distribute modified code is granted // provided this copyright notice appears in all copies, and a notice // that the code was modified is included with the copyright notice. // // This software is provided "as is" without express or implied warranty, // and with no claim as to its suitability for any purpose. // #include #include #include #include #include #include "held_ptr.hpp" using namespace boost::python; namespace PyOSGParticle { void init_ParticleSystemUpdater() { class_, bases, boost::noncopyable > updater("ParticleSystemUpdater", "A useful node class for updating particle systems automatically." "When a ParticleSystemUpdater is traversed by a cull visitor, it calls the" "update() method on the specified particle systems. You should place this updater" "AFTER other nodes like emitters and programs.", no_init); updater.def(init<>()); updater.def("getNumParticleSystems", &osgParticle::ParticleSystemUpdater::getNumParticleSystems, "Return the number of particle systems on the list."); updater.def("addParticleSystem", &osgParticle::ParticleSystemUpdater::addParticleSystem, "Add a particle system to the list."); updater.def("getParticleSystem", (osgParticle::ParticleSystem *(osgParticle::ParticleSystemUpdater::*)(unsigned int)) &osgParticle::ParticleSystemUpdater::getParticleSystem, "Get a particle system from the list.", return_internal_reference<>()); updater.def("removeParticleSystem", (bool (osgParticle::ParticleSystemUpdater::*)(unsigned int, unsigned int)) &osgParticle::ParticleSystemUpdater::removeParticleSystem, "Remove a particle system from the list (by index)."); updater.def("removeParticleSystem", (bool (osgParticle::ParticleSystemUpdater::*)(osgParticle::ParticleSystem *))&osgParticle::ParticleSystemUpdater::removeParticleSystem, "Remove a particle system from the list (by pointer)."); } }