// 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_ModularEmitter() { class_, bases > modularEmitter("ModularEmitter", "An emitter class that holds three objects to control the creation of particles." "These objects are a counter, a placer and a shooter." "The counter controls the number of particles to be emitted at each frame; " "the placer must initialize the particle's position vector, while the shooter initializes " "its velocity vector." "You can use the predefined counter/placer/shooter classes, or you can create your own.", no_init); modularEmitter.def(init<>()); modularEmitter.def("getCounter", (osgParticle::Counter*(osgParticle::ModularEmitter::*)()) &osgParticle::ModularEmitter::getCounter, "Get the counter object.", return_internal_reference<>()); modularEmitter.def("setCounter", &osgParticle::ModularEmitter::setCounter, "Set the Counter object."); modularEmitter.def("getPlacer", (osgParticle::Placer *(osgParticle::ModularEmitter::*)())&osgParticle::ModularEmitter::getPlacer, "Get the Placer object.", return_internal_reference<>()); modularEmitter.def("setPlacer", &osgParticle::ModularEmitter::setPlacer, "Set the Placer object."); modularEmitter.def("getShooter", (osgParticle::Shooter *(osgParticle::ModularEmitter::*)())&osgParticle::ModularEmitter::getShooter, "Get the Shooter object.", return_internal_reference<>()); modularEmitter.def("setShooter", &osgParticle::ModularEmitter::setShooter, "Set the Shooter object."); } }