#include <ParticleSource.h>


Public Types | |
| typedef TDataTypes | DataTypes |
| typedef DataTypes::Real | Real |
| typedef DataTypes::Coord | Coord |
| typedef DataTypes::VecCoord | VecCoord |
| typedef DataTypes::Deriv | Deriv |
| typedef DataTypes::VecDeriv | VecDeriv |
| typedef helper::vector< Real > | VecDensity |
| typedef core::componentmodel::behavior::MechanicalState < DataTypes > | MechanicalModel |
Public Member Functions | |
| ParticleSource () | |
| virtual | ~ParticleSource () |
| virtual void | init () |
| Initialization method called at graph modification, during bottom-up traversal. | |
| virtual void | reset () |
| Reset to initial state. | |
| Real | rrand () |
| virtual void | animateBegin (double, double time) |
| void | handleTopologyChange () |
| Handle topological changes. | |
| virtual void | projectResponse (VecDeriv &res) |
| Project dx to constrained space (dx models an acceleration). | |
| virtual void | projectVelocity (VecDeriv &res) |
| Project v to constrained space (v models a velocity). | |
| virtual void | projectPosition (VecCoord &x) |
| Project x to constrained space (x models a position). | |
| virtual void | animateEnd (double, double) |
| virtual void | handleEvent (sofa::core::objectmodel::Event *event) |
| Handle an event. | |
Data Fields | |
| Data< Coord > | f_translation |
| Data< Real > | f_scale |
| Data< helper::vector< Coord > > | f_center |
| Data< Coord > | f_radius |
| Data< Deriv > | f_velocity |
| Data< Real > | f_delay |
| Data< Real > | f_start |
| Data< Real > | f_stop |
| int | N |
| Real | lasttime |
| topology::PointSubset | lastparticles |
| helper::vector< Coord > | lastpos |
Static Protected Member Functions | |
| static bool | PSTestNewPointFunction (int, void *, const sofa::helper::vector< unsigned int > &, const sofa::helper::vector< double > &) |
| static void | PSRemovalFunction (int index, void *p) |
Definition at line 60 of file ParticleSource.h.
| typedef DataTypes::Coord sofa::component::ParticleSource< TDataTypes >::Coord |
Reimplemented from sofa::core::componentmodel::behavior::Constraint< TDataTypes >.
Definition at line 65 of file ParticleSource.h.
| typedef TDataTypes sofa::component::ParticleSource< TDataTypes >::DataTypes |
Definition at line 63 of file ParticleSource.h.
| typedef DataTypes::Deriv sofa::component::ParticleSource< TDataTypes >::Deriv |
Reimplemented from sofa::core::componentmodel::behavior::Constraint< TDataTypes >.
Definition at line 67 of file ParticleSource.h.
| typedef core::componentmodel::behavior::MechanicalState<DataTypes> sofa::component::ParticleSource< TDataTypes >::MechanicalModel |
Definition at line 71 of file ParticleSource.h.
| typedef DataTypes::Real sofa::component::ParticleSource< TDataTypes >::Real |
Reimplemented from sofa::core::componentmodel::behavior::Constraint< TDataTypes >.
Definition at line 64 of file ParticleSource.h.
| typedef DataTypes::VecCoord sofa::component::ParticleSource< TDataTypes >::VecCoord |
Reimplemented from sofa::core::componentmodel::behavior::Constraint< TDataTypes >.
Definition at line 66 of file ParticleSource.h.
| typedef helper::vector<Real> sofa::component::ParticleSource< TDataTypes >::VecDensity |
Definition at line 69 of file ParticleSource.h.
| typedef DataTypes::VecDeriv sofa::component::ParticleSource< TDataTypes >::VecDeriv |
Reimplemented from sofa::core::componentmodel::behavior::Constraint< TDataTypes >.
Definition at line 68 of file ParticleSource.h.
| sofa::component::ParticleSource< TDataTypes >::ParticleSource | ( | ) | [inline] |
Definition at line 82 of file ParticleSource.h.
References sofa::component::ParticleSource< TDataTypes >::f_center, sofa::core::objectmodel::BaseObject::f_listening, and sofa::core::objectmodel::Data< T >::setValue().
| virtual sofa::component::ParticleSource< TDataTypes >::~ParticleSource | ( | ) | [inline, virtual] |
Definition at line 96 of file ParticleSource.h.
| virtual void sofa::component::ParticleSource< TDataTypes >::animateBegin | ( | double | , | |
| double | time | |||
| ) | [inline, virtual] |
Definition at line 137 of file ParticleSource.h.
References sofa::component::topology::PointSetTopologyModifier::addPointsProcess(), sofa::component::topology::PointSetTopologyModifier::addPointsWarning(), sofa::component::ParticleSource< TDataTypes >::f_center, sofa::component::ParticleSource< TDataTypes >::f_delay, sofa::component::ParticleSource< TDataTypes >::f_radius, sofa::component::ParticleSource< TDataTypes >::f_scale, sofa::component::ParticleSource< TDataTypes >::f_start, sofa::component::ParticleSource< TDataTypes >::f_stop, sofa::component::ParticleSource< TDataTypes >::f_translation, sofa::component::ParticleSource< TDataTypes >::f_velocity, sofa::core::objectmodel::BaseContext::get(), sofa::core::objectmodel::BaseObject::getContext(), sofa::core::objectmodel::BaseContext::getMeshTopology(), sofa::core::componentmodel::behavior::MechanicalState< TDataTypes >::getV(), sofa::core::objectmodel::Data< T >::getValue(), sofa::core::componentmodel::behavior::MechanicalState< TDataTypes >::getX(), sofa::component::ParticleSource< TDataTypes >::lastparticles, sofa::component::ParticleSource< TDataTypes >::lastpos, sofa::component::ParticleSource< TDataTypes >::lasttime, sofa::core::componentmodel::behavior::Constraint< TDataTypes >::mstate, sofa::component::ParticleSource< TDataTypes >::N, sofa::component::topology::PointSetTopologyModifier::propagateTopologicalChanges(), sofa::component::topology::PointSubset::resize(), sofa::core::componentmodel::behavior::BaseMechanicalState::resize(), and sofa::component::ParticleSource< TDataTypes >::rrand().
Referenced by sofa::component::ParticleSource< TDataTypes >::handleEvent().
| virtual void sofa::component::ParticleSource< TDataTypes >::animateEnd | ( | double | , | |
| double | ||||
| ) | [inline, virtual] |
Definition at line 263 of file ParticleSource.h.
Referenced by sofa::component::ParticleSource< TDataTypes >::handleEvent().
| virtual void sofa::component::ParticleSource< TDataTypes >::handleEvent | ( | sofa::core::objectmodel::Event * | e | ) | [inline, virtual] |
Handle an event.
Reimplemented from sofa::core::objectmodel::BaseObject.
Definition at line 268 of file ParticleSource.h.
References sofa::component::ParticleSource< TDataTypes >::animateBegin(), sofa::component::ParticleSource< TDataTypes >::animateEnd(), sofa::core::objectmodel::BaseObject::getContext(), and sofa::core::objectmodel::BaseContext::getTime().
| void sofa::component::ParticleSource< TDataTypes >::handleTopologyChange | ( | ) | [inline, virtual] |
Handle topological changes.
Reimplemented from sofa::core::objectmodel::BaseObject.
Definition at line 187 of file ParticleSource.h.
References sofa::component::topology::PointSubset::begin(), sofa::component::topology::PointSubset::end(), sofa::core::objectmodel::BaseObject::f_printLog, sofa::core::componentmodel::topology::BaseMeshTopology::firstChange(), sofa::core::objectmodel::BaseObject::getContext(), sofa::core::objectmodel::BaseContext::getMeshTopology(), sofa::core::componentmodel::behavior::BaseMechanicalState::getSize(), sofa::core::objectmodel::Data< T >::getValue(), sofa::component::topology::PointSubset::handleTopologyEvents(), sofa::core::componentmodel::topology::BaseMeshTopology::lastChange(), sofa::component::ParticleSource< TDataTypes >::lastparticles, sofa::core::componentmodel::behavior::Constraint< TDataTypes >::mstate, and sofa::component::topology::PointSubset::size().
| virtual void sofa::component::ParticleSource< TDataTypes >::init | ( | void | ) | [inline, virtual] |
Initialization method called at graph modification, during bottom-up traversal.
Reimplemented from sofa::core::objectmodel::BaseObject.
Definition at line 106 of file ParticleSource.h.
References sofa::component::ParticleSource< TDataTypes >::f_center, sofa::component::ParticleSource< TDataTypes >::f_delay, sofa::component::ParticleSource< TDataTypes >::f_radius, sofa::component::ParticleSource< TDataTypes >::f_start, sofa::component::ParticleSource< TDataTypes >::f_stop, sofa::core::objectmodel::Data< T >::getValue(), sofa::component::ParticleSource< TDataTypes >::lastparticles, sofa::component::ParticleSource< TDataTypes >::lastpos, sofa::component::ParticleSource< TDataTypes >::lasttime, sofa::core::componentmodel::behavior::Constraint< TDataTypes >::mstate, sofa::component::ParticleSource< TDataTypes >::N, sofa::component::ParticleSource< TDataTypes >::PSRemovalFunction(), sofa::component::ParticleSource< TDataTypes >::PSTestNewPointFunction(), sofa::component::topology::PointSubset::setRemovalFunction(), sofa::component::topology::PointSubset::setRemovalParameter(), sofa::component::topology::PointSubset::setTestFunction(), and sofa::component::topology::PointSubset::setTestParameter().
| virtual void sofa::component::ParticleSource< TDataTypes >::projectPosition | ( | VecCoord & | x | ) | [inline, virtual] |
Project x to constrained space (x models a position).
This method must be implemented by the component, and is usually called by the generic Constraint::projectPosition() method.
| x | project x to constrained space (x models a position) |
Implements sofa::core::componentmodel::behavior::Constraint< TDataTypes >.
Definition at line 247 of file ParticleSource.h.
References sofa::component::topology::PointSubset::empty(), sofa::component::ParticleSource< TDataTypes >::f_start, sofa::component::ParticleSource< TDataTypes >::f_stop, sofa::component::ParticleSource< TDataTypes >::f_velocity, sofa::core::objectmodel::BaseObject::getContext(), sofa::core::objectmodel::BaseContext::getTime(), sofa::core::objectmodel::Data< T >::getValue(), sofa::component::ParticleSource< TDataTypes >::lastparticles, sofa::component::ParticleSource< TDataTypes >::lastpos, sofa::component::ParticleSource< TDataTypes >::lasttime, sofa::core::componentmodel::behavior::Constraint< TDataTypes >::mstate, and sofa::component::topology::PointSubset::size().
| virtual void sofa::component::ParticleSource< TDataTypes >::projectResponse | ( | VecDeriv & | dx | ) | [inline, virtual] |
Project dx to constrained space (dx models an acceleration).
This method must be implemented by the component, and is usually called by the generic Constraint::projectResponse() method.
| dx | project dx to constrained space |
Implements sofa::core::componentmodel::behavior::Constraint< TDataTypes >.
Definition at line 215 of file ParticleSource.h.
References sofa::component::topology::PointSubset::empty(), sofa::component::ParticleSource< TDataTypes >::f_start, sofa::component::ParticleSource< TDataTypes >::f_stop, sofa::core::objectmodel::BaseObject::getContext(), sofa::core::objectmodel::BaseContext::getTime(), sofa::core::objectmodel::Data< T >::getValue(), sofa::component::ParticleSource< TDataTypes >::lastparticles, sofa::core::componentmodel::behavior::Constraint< TDataTypes >::mstate, and sofa::component::topology::PointSubset::size().
| virtual void sofa::component::ParticleSource< TDataTypes >::projectVelocity | ( | VecDeriv & | v | ) | [inline, virtual] |
Project v to constrained space (v models a velocity).
This method must be implemented by the component, and is usually called by the generic Constraint::projectVelocity() method.
| v | project dx to constrained space (dx models a velocity) |
Implements sofa::core::componentmodel::behavior::Constraint< TDataTypes >.
Definition at line 232 of file ParticleSource.h.
References sofa::component::topology::PointSubset::empty(), sofa::component::ParticleSource< TDataTypes >::f_start, sofa::component::ParticleSource< TDataTypes >::f_stop, sofa::component::ParticleSource< TDataTypes >::f_velocity, sofa::core::objectmodel::BaseObject::getContext(), sofa::core::objectmodel::BaseContext::getTime(), sofa::core::objectmodel::Data< T >::getValue(), sofa::component::ParticleSource< TDataTypes >::lastparticles, sofa::core::componentmodel::behavior::Constraint< TDataTypes >::mstate, and sofa::component::topology::PointSubset::size().
| static void sofa::component::ParticleSource< TDataTypes >::PSRemovalFunction | ( | int | index, | |
| void * | p | |||
| ) | [inline, static, protected] |
Definition at line 283 of file ParticleSource.h.
References sofa::component::topology::PointSubset::begin(), sofa::component::topology::PointSubset::end(), sofa::component::ParticleSource< TDataTypes >::lastparticles, sofa::component::ParticleSource< TDataTypes >::lastpos, and sofa::helper::removeValue().
Referenced by sofa::component::ParticleSource< TDataTypes >::init().
| static bool sofa::component::ParticleSource< TDataTypes >::PSTestNewPointFunction | ( | int | , | |
| void * | , | |||
| const sofa::helper::vector< unsigned int > & | , | |||
| const sofa::helper::vector< double > & | ||||
| ) | [inline, static, protected] |
Definition at line 278 of file ParticleSource.h.
Referenced by sofa::component::ParticleSource< TDataTypes >::init().
| virtual void sofa::component::ParticleSource< TDataTypes >::reset | ( | void | ) | [inline, virtual] |
Reset to initial state.
Reimplemented from sofa::core::objectmodel::BaseObject.
Definition at line 124 of file ParticleSource.h.
References sofa::component::topology::PointSubset::clear(), sofa::component::ParticleSource< TDataTypes >::f_delay, sofa::component::ParticleSource< TDataTypes >::f_start, sofa::core::objectmodel::Data< T >::getValue(), sofa::component::ParticleSource< TDataTypes >::lastparticles, sofa::component::ParticleSource< TDataTypes >::lastpos, sofa::component::ParticleSource< TDataTypes >::lasttime, sofa::core::componentmodel::behavior::Constraint< TDataTypes >::mstate, and sofa::core::componentmodel::behavior::BaseMechanicalState::resize().
| Real sofa::component::ParticleSource< TDataTypes >::rrand | ( | ) | [inline] |
Definition at line 132 of file ParticleSource.h.
Referenced by sofa::component::ParticleSource< TDataTypes >::animateBegin().
| Data< helper::vector<Coord> > sofa::component::ParticleSource< TDataTypes >::f_center |
Definition at line 75 of file ParticleSource.h.
Referenced by sofa::component::ParticleSource< TDataTypes >::animateBegin(), sofa::component::ParticleSource< TDataTypes >::init(), and sofa::component::ParticleSource< TDataTypes >::ParticleSource().
| Data<Real> sofa::component::ParticleSource< TDataTypes >::f_delay |
Definition at line 78 of file ParticleSource.h.
Referenced by sofa::component::ParticleSource< TDataTypes >::animateBegin(), sofa::component::ParticleSource< TDataTypes >::init(), and sofa::component::ParticleSource< TDataTypes >::reset().
| Data<Coord> sofa::component::ParticleSource< TDataTypes >::f_radius |
Definition at line 76 of file ParticleSource.h.
Referenced by sofa::component::ParticleSource< TDataTypes >::animateBegin(), and sofa::component::ParticleSource< TDataTypes >::init().
| Data<Real> sofa::component::ParticleSource< TDataTypes >::f_scale |
Definition at line 74 of file ParticleSource.h.
Referenced by sofa::component::ParticleSource< TDataTypes >::animateBegin().
| Data<Real> sofa::component::ParticleSource< TDataTypes >::f_start |
Definition at line 79 of file ParticleSource.h.
Referenced by sofa::component::ParticleSource< TDataTypes >::animateBegin(), sofa::component::ParticleSource< TDataTypes >::init(), sofa::component::ParticleSource< TDataTypes >::projectPosition(), sofa::component::ParticleSource< TDataTypes >::projectResponse(), sofa::component::ParticleSource< TDataTypes >::projectVelocity(), and sofa::component::ParticleSource< TDataTypes >::reset().
| Data<Real> sofa::component::ParticleSource< TDataTypes >::f_stop |
Definition at line 80 of file ParticleSource.h.
Referenced by sofa::component::ParticleSource< TDataTypes >::animateBegin(), sofa::component::ParticleSource< TDataTypes >::init(), sofa::component::ParticleSource< TDataTypes >::projectPosition(), sofa::component::ParticleSource< TDataTypes >::projectResponse(), and sofa::component::ParticleSource< TDataTypes >::projectVelocity().
| Data<Coord> sofa::component::ParticleSource< TDataTypes >::f_translation |
Definition at line 73 of file ParticleSource.h.
Referenced by sofa::component::ParticleSource< TDataTypes >::animateBegin().
| Data<Deriv> sofa::component::ParticleSource< TDataTypes >::f_velocity |
Definition at line 77 of file ParticleSource.h.
Referenced by sofa::component::ParticleSource< TDataTypes >::animateBegin(), sofa::component::ParticleSource< TDataTypes >::projectPosition(), and sofa::component::ParticleSource< TDataTypes >::projectVelocity().
| topology::PointSubset sofa::component::ParticleSource< TDataTypes >::lastparticles |
Definition at line 103 of file ParticleSource.h.
Referenced by sofa::component::ParticleSource< TDataTypes >::animateBegin(), sofa::component::ParticleSource< TDataTypes >::handleTopologyChange(), sofa::component::ParticleSource< TDataTypes >::init(), sofa::component::ParticleSource< TDataTypes >::projectPosition(), sofa::component::ParticleSource< TDataTypes >::projectResponse(), sofa::component::ParticleSource< TDataTypes >::projectVelocity(), sofa::component::ParticleSource< TDataTypes >::PSRemovalFunction(), and sofa::component::ParticleSource< TDataTypes >::reset().
| helper::vector<Coord> sofa::component::ParticleSource< TDataTypes >::lastpos |
Definition at line 104 of file ParticleSource.h.
Referenced by sofa::component::ParticleSource< TDataTypes >::animateBegin(), sofa::component::ParticleSource< TDataTypes >::init(), sofa::component::ParticleSource< TDataTypes >::projectPosition(), sofa::component::ParticleSource< TDataTypes >::PSRemovalFunction(), and sofa::component::ParticleSource< TDataTypes >::reset().
| Real sofa::component::ParticleSource< TDataTypes >::lasttime |
Definition at line 101 of file ParticleSource.h.
Referenced by sofa::component::ParticleSource< TDataTypes >::animateBegin(), sofa::component::ParticleSource< TDataTypes >::init(), sofa::component::ParticleSource< TDataTypes >::projectPosition(), and sofa::component::ParticleSource< TDataTypes >::reset().
| int sofa::component::ParticleSource< TDataTypes >::N |
Definition at line 100 of file ParticleSource.h.
Referenced by sofa::component::ParticleSource< TDataTypes >::animateBegin(), and sofa::component::ParticleSource< TDataTypes >::init().
1.5.7.1