#include <ConicalForceField.h>


Data Structures | |
| class | Contact |
Public Types | |
| typedef core::componentmodel::behavior::ForceField < DataTypes > | Inherit |
| typedef DataTypes::VecCoord | VecCoord |
| typedef DataTypes::VecDeriv | VecDeriv |
| typedef DataTypes::Coord | Coord |
| typedef DataTypes::Deriv | Deriv |
| typedef Coord::value_type | Real |
Public Member Functions | |
| ConicalForceField () | |
| void | setCone (const Coord ¢er, Coord height, Real angle) |
| void | setStiffness (Real stiff) |
| void | setDamping (Real damp) |
| virtual void | addForce (VecDeriv &f, const VecCoord &x, const VecDeriv &v) |
| Given the current position and velocity states, update the current force vector by computing and adding the forces associated with this ForceField. | |
| virtual void | addDForce (VecDeriv &df, const VecDeriv &dx) |
| Compute the force derivative given a small displacement from the position and velocity used in the previous call to addForce(). | |
| virtual double | getPotentialEnergy (const VecCoord &x) |
| Get the potential energy associated to this ForceField. | |
| virtual void | updateStiffness (const VecCoord &x) |
| virtual bool | isIn (Coord p) |
| void | draw () |
| Render internal data of this object, for debugging purposes. | |
Data Fields | |
| Data< Coord > | coneCenter |
| Data< Coord > | coneHeight |
| Data< Real > | coneAngle |
| Data< Real > | stiffness |
| Data< Real > | damping |
| Data< defaulttype::Vec3f > | color |
| Data< bool > | bDraw |
Protected Attributes | |
| Data< sofa::helper::vector < Contact > > | contacts |
| ConicalForceFieldInternalData < DataTypes > | data |
Definition at line 60 of file ConicalForceField.h.
| typedef DataTypes::Coord sofa::component::forcefield::ConicalForceField< DataTypes >::Coord |
Reimplemented from sofa::core::componentmodel::behavior::ForceField< DataTypes >.
Definition at line 66 of file ConicalForceField.h.
| typedef DataTypes::Deriv sofa::component::forcefield::ConicalForceField< DataTypes >::Deriv |
Reimplemented from sofa::core::componentmodel::behavior::ForceField< DataTypes >.
Definition at line 67 of file ConicalForceField.h.
| typedef core::componentmodel::behavior::ForceField<DataTypes> sofa::component::forcefield::ConicalForceField< DataTypes >::Inherit |
Definition at line 63 of file ConicalForceField.h.
| typedef Coord::value_type sofa::component::forcefield::ConicalForceField< DataTypes >::Real |
Definition at line 68 of file ConicalForceField.h.
| typedef DataTypes::VecCoord sofa::component::forcefield::ConicalForceField< DataTypes >::VecCoord |
Reimplemented from sofa::core::componentmodel::behavior::ForceField< DataTypes >.
Definition at line 64 of file ConicalForceField.h.
| typedef DataTypes::VecDeriv sofa::component::forcefield::ConicalForceField< DataTypes >::VecDeriv |
Reimplemented from sofa::core::componentmodel::behavior::ForceField< DataTypes >.
Definition at line 65 of file ConicalForceField.h.
| sofa::component::forcefield::ConicalForceField< DataTypes >::ConicalForceField | ( | ) | [inline] |
Definition at line 109 of file ConicalForceField.h.
| void sofa::component::forcefield::ConicalForceField< DataTypes >::addDForce | ( | VecDeriv & | df, | |
| const VecDeriv & | dx | |||
| ) | [inline, virtual] |
Compute the force derivative given a small displacement from the position and velocity used in the previous call to addForce().
The derivative should be directly derived from the computations done by addForce. Any forces neglected in addDForce will be integrated explicitly (i.e. using its value at the beginning of the timestep).
If the ForceField can be represented as a matrix, this method computes $ df += K dx $
This method must be implemented by the component, and is usually called by the generic ForceField::addDForce() method.
Reimplemented from sofa::core::componentmodel::behavior::ForceField< DataTypes >.
Definition at line 129 of file ConicalForceField.inl.
References sofa::component::forcefield::ConicalForceField< DataTypes >::contacts, sofa::core::objectmodel::Data< T >::getValue(), sofa::component::forcefield::ConicalForceField< DataTypes >::Contact::index, sofa::component::forcefield::ConicalForceField< DataTypes >::Contact::normal, and sofa::component::forcefield::ConicalForceField< DataTypes >::stiffness.
| void sofa::component::forcefield::ConicalForceField< DataTypes >::addForce | ( | VecDeriv & | f, | |
| const VecCoord & | x, | |||
| const VecDeriv & | v | |||
| ) | [inline, virtual] |
Given the current position and velocity states, update the current force vector by computing and adding the forces associated with this ForceField.
If the ForceField can be represented as a matrix, this method computes $ f += B v + K x $
This method must be implemented by the component, and is usually called by the generic ForceField::addForce() method.
Implements sofa::core::componentmodel::behavior::ForceField< DataTypes >.
Definition at line 49 of file ConicalForceField.inl.
References sofa::component::forcefield::ConicalForceField< DataTypes >::coneAngle, sofa::component::forcefield::ConicalForceField< DataTypes >::coneCenter, sofa::component::forcefield::ConicalForceField< DataTypes >::coneHeight, sofa::component::forcefield::ConicalForceField< DataTypes >::contacts, sofa::component::forcefield::ConicalForceField< DataTypes >::damping, dot(), force, sofa::core::objectmodel::Data< T >::getValue(), sofa::component::forcefield::ConicalForceField< DataTypes >::Contact::index, sofa::component::forcefield::ConicalForceField< DataTypes >::isIn(), norm(), sofa::component::forcefield::ConicalForceField< DataTypes >::Contact::normal, sofa::defaulttype::Vec< N, real >::normalize(), sofa::component::forcefield::ConicalForceField< DataTypes >::Contact::pos, sofa::helper::Quater< Real >::rotate(), and sofa::component::forcefield::ConicalForceField< DataTypes >::stiffness.
| void sofa::component::forcefield::ConicalForceField< DataTypes >::draw | ( | ) | [inline, virtual] |
Render internal data of this object, for debugging purposes.
Reimplemented from sofa::core::objectmodel::BaseObject.
Definition at line 157 of file ConicalForceField.inl.
References sofa::component::forcefield::ConicalForceField< DataTypes >::bDraw, sofa::component::forcefield::ConicalForceField< DataTypes >::color, sofa::component::forcefield::ConicalForceField< DataTypes >::coneAngle, sofa::component::forcefield::ConicalForceField< DataTypes >::coneCenter, sofa::component::forcefield::ConicalForceField< DataTypes >::coneHeight, sofa::core::objectmodel::BaseObject::getContext(), and sofa::core::objectmodel::Data< T >::getValue().
| double sofa::component::forcefield::ConicalForceField< DataTypes >::getPotentialEnergy | ( | const VecCoord & | x | ) | [inline, virtual] |
Get the potential energy associated to this ForceField.
Used to extimate the total energy of the system by some post-stabilization techniques.
This method must be implemented by the component, and is usually called by the generic ForceField::getPotentialEnergy() method.
Implements sofa::core::componentmodel::behavior::ForceField< DataTypes >.
Definition at line 150 of file ConicalForceField.inl.
| bool sofa::component::forcefield::ConicalForceField< DataTypes >::isIn | ( | Coord | p | ) | [inline, virtual] |
Definition at line 206 of file ConicalForceField.inl.
References sofa::component::forcefield::ConicalForceField< DataTypes >::coneAngle, sofa::component::forcefield::ConicalForceField< DataTypes >::coneCenter, sofa::component::forcefield::ConicalForceField< DataTypes >::coneHeight, and sofa::core::objectmodel::Data< T >::getValue().
Referenced by sofa::component::forcefield::ConicalForceField< DataTypes >::addForce().
| void sofa::component::forcefield::ConicalForceField< DataTypes >::setCone | ( | const Coord & | center, | |
| Coord | height, | |||
| Real | angle | |||
| ) | [inline] |
Definition at line 121 of file ConicalForceField.h.
References sofa::component::forcefield::ConicalForceField< DataTypes >::coneAngle, sofa::component::forcefield::ConicalForceField< DataTypes >::coneCenter, sofa::component::forcefield::ConicalForceField< DataTypes >::coneHeight, and sofa::core::objectmodel::Data< T >::setValue().
| void sofa::component::forcefield::ConicalForceField< DataTypes >::setDamping | ( | Real | damp | ) | [inline] |
Definition at line 133 of file ConicalForceField.h.
References sofa::component::forcefield::ConicalForceField< DataTypes >::damping, and sofa::core::objectmodel::Data< T >::setValue().
| void sofa::component::forcefield::ConicalForceField< DataTypes >::setStiffness | ( | Real | stiff | ) | [inline] |
Definition at line 128 of file ConicalForceField.h.
References sofa::core::objectmodel::Data< T >::setValue(), and sofa::component::forcefield::ConicalForceField< DataTypes >::stiffness.
| void sofa::component::forcefield::ConicalForceField< DataTypes >::updateStiffness | ( | const VecCoord & | x | ) | [inline, virtual] |
Definition at line 144 of file ConicalForceField.inl.
| Data<bool> sofa::component::forcefield::ConicalForceField< DataTypes >::bDraw |
Definition at line 107 of file ConicalForceField.h.
Referenced by sofa::component::forcefield::ConicalForceField< DataTypes >::draw().
| Data<defaulttype::Vec3f> sofa::component::forcefield::ConicalForceField< DataTypes >::color |
Definition at line 106 of file ConicalForceField.h.
Referenced by sofa::component::forcefield::ConicalForceField< DataTypes >::draw().
| Data<Real> sofa::component::forcefield::ConicalForceField< DataTypes >::coneAngle |
Definition at line 102 of file ConicalForceField.h.
Referenced by sofa::component::forcefield::ConicalForceField< DataTypes >::addForce(), sofa::component::forcefield::ConicalForceField< DataTypes >::draw(), sofa::component::forcefield::ConicalForceField< DataTypes >::isIn(), and sofa::component::forcefield::ConicalForceField< DataTypes >::setCone().
| Data<Coord> sofa::component::forcefield::ConicalForceField< DataTypes >::coneCenter |
Definition at line 100 of file ConicalForceField.h.
Referenced by sofa::component::forcefield::ConicalForceField< DataTypes >::addForce(), sofa::component::forcefield::ConicalForceField< DataTypes >::draw(), sofa::component::forcefield::ConicalForceField< DataTypes >::isIn(), and sofa::component::forcefield::ConicalForceField< DataTypes >::setCone().
| Data<Coord> sofa::component::forcefield::ConicalForceField< DataTypes >::coneHeight |
Definition at line 101 of file ConicalForceField.h.
Referenced by sofa::component::forcefield::ConicalForceField< DataTypes >::addForce(), sofa::component::forcefield::ConicalForceField< DataTypes >::draw(), sofa::component::forcefield::ConicalForceField< DataTypes >::isIn(), and sofa::component::forcefield::ConicalForceField< DataTypes >::setCone().
Data<sofa::helper::vector<Contact> > sofa::component::forcefield::ConicalForceField< DataTypes >::contacts [protected] |
Definition at line 94 of file ConicalForceField.h.
Referenced by sofa::component::forcefield::ConicalForceField< DataTypes >::addDForce(), and sofa::component::forcefield::ConicalForceField< DataTypes >::addForce().
| Data<Real> sofa::component::forcefield::ConicalForceField< DataTypes >::damping |
Definition at line 105 of file ConicalForceField.h.
Referenced by sofa::component::forcefield::ConicalForceField< DataTypes >::addForce(), and sofa::component::forcefield::ConicalForceField< DataTypes >::setDamping().
ConicalForceFieldInternalData<DataTypes> sofa::component::forcefield::ConicalForceField< DataTypes >::data [protected] |
Definition at line 96 of file ConicalForceField.h.
| Data<Real> sofa::component::forcefield::ConicalForceField< DataTypes >::stiffness |
1.5.7.1