// 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_MultiSegmentPlacer() { class_, bases, boost::noncopyable > placer("MultiSegmentPlacer", "A polyline-shaped particle placer." "This placer class sets the position of incoming particles by choosing a random point on the" "specified sequence of connected segments.", no_init); placer.def(init<>()) .def("numVertices", &osgParticle::MultiSegmentPlacer::numVertices, "Get the number of vertices which define the segments.") .def("getVertex", &osgParticle::MultiSegmentPlacer::getVertex, "Get a vertex.", return_internal_reference<>()) .def("setVertex", (void (osgParticle::MultiSegmentPlacer::*)(int, const osg::Vec3&)) &osgParticle::MultiSegmentPlacer::setVertex, "Set a vertex.") .def("setVertex", (void (osgParticle::MultiSegmentPlacer::*)(int, float, float, float)) &osgParticle::MultiSegmentPlacer::setVertex, "Set a vertex.") .def("addVertex", (void (osgParticle::MultiSegmentPlacer::*)(const osg::Vec3&)) &osgParticle::MultiSegmentPlacer::addVertex, "Add a vertex.") .def("addVertex", (void (osgParticle::MultiSegmentPlacer::*)(float, float, float)) &osgParticle::MultiSegmentPlacer::addVertex, "Add a vertex.") .def("removeVertex", &osgParticle::MultiSegmentPlacer::removeVertex, "Remove a vertex.") ; } }