// 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_RadialShooter() { class_, bases > shooter("RadialShooter", "A shooter class that shoots particles radially." "This shooter computes the velocity vector of incoming particles by choosing a" "random direction and a random speed. Both direction and speed are chosen within" "specified ranges. The direction is defined by two angles: theta, which" "is the angle between the velocity vector and the Z axis, and phi, which is" "the angle between the X axis and the velocity vector projected onto the X-Y plane.", no_init); shooter.def(init<>()); shooter.def("getThetaRange", &osgParticle::RadialShooter::getThetaRange, "Get the range of possible values for theta angle.", return_internal_reference<>()); shooter.def("setThetaRange",(void (osgParticle::RadialShooter::*)(const osgParticle::rangef&)) &osgParticle::RadialShooter::setThetaRange, "Set the range of possible values for theta angle."); shooter.def("setThetaRange",(void (osgParticle::RadialShooter::*)(float, float)) &osgParticle::RadialShooter::setThetaRange, "Set the range of possible values for theta angle."); shooter.def("getPhiRange", &osgParticle::RadialShooter::getPhiRange, "Get the range of possible values for phi angle.", return_internal_reference<>()); shooter.def("setPhiRange",(void (osgParticle::RadialShooter::*)(const osgParticle::rangef&)) &osgParticle::RadialShooter::setPhiRange, "Set the range of possible values for phi angle."); shooter.def("setPhiRange",(void (osgParticle::RadialShooter::*)(float, float)) &osgParticle::RadialShooter::setPhiRange, "Set the range of possible values for phi angle."); shooter.def("getInitialSpeedRange", &osgParticle::RadialShooter::getInitialSpeedRange, "Get the range of possible values for initial speed of particles.", return_internal_reference<>()); shooter.def("setInitialSpeedRange",(void (osgParticle::RadialShooter::*)(const osgParticle::rangef&)) &osgParticle::RadialShooter::setInitialSpeedRange, "Set the range of possible values for initial speed of particles."); shooter.def("setInitialSpeedRange",(void (osgParticle::RadialShooter::*)(float, float)) &osgParticle::RadialShooter::setInitialSpeedRange, "Set the range of possible values for initial speed of particles."); } }