// 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 "held_ptr.hpp" using namespace boost::python; namespace PyOSGParticle { void init_FluidFrictionOperator() { class_, bases > oper("FluidFrictionOperator", "An operator that simulates the friction of a fluid." "By using this operator you can let the particles move in a fluid of a given density" "and viscosity. There are two functions to quickly setup the parameters for pure water" "and air. You can decide whether to compute the forces using the particle's physical " "radius or another value, by calling the setOverrideRadius() method.", no_init); oper .def(init<>()) .def("getFluidDensity", &osgParticle::FluidFrictionOperator::getFluidDensity, "Get the density of the fluid.") .def("setFluidDensity", &osgParticle::FluidFrictionOperator::setFluidDensity, "Set the density of the fluid.") .def("getFluidViscosity", &osgParticle::FluidFrictionOperator::getFluidViscosity, "Get the viscosity of the fluid.") .def("setFluidViscosity", &osgParticle::FluidFrictionOperator::setFluidViscosity, "Set the viscosity of the fluid.") .def("getOverrideRadius", &osgParticle::FluidFrictionOperator::getOverrideRadius, "Get the overriden radius value.") .def("setOverrideRadius", &osgParticle::FluidFrictionOperator::setOverrideRadius, "Set the overriden radius value (pass 0 if you want to use particle's radius).") .def("setFluidToAir", &osgParticle::FluidFrictionOperator::setFluidToAir, "Set the fluid parameters as for air (20°C temperature).") .def("setFluidToWater", &osgParticle::FluidFrictionOperator::setFluidToWater, "Set the fluid parameters as for pure water (20°C temperature).") ; } }