#include <UnilateralInteractionConstraint.h>


Data Structures | |
| struct | Contact |
Public Types | |
| typedef DataTypes::VecCoord | VecCoord |
| typedef DataTypes::VecDeriv | VecDeriv |
| typedef DataTypes::VecConst | VecConst |
| typedef DataTypes::SparseVecDeriv | SparseVecDeriv |
| typedef DataTypes::SparseDeriv | SparseDeriv |
| typedef DataTypes::Coord | Coord |
| typedef DataTypes::Deriv | Deriv |
| typedef Coord::value_type | Real |
| typedef core::componentmodel::behavior::MechanicalState < DataTypes > | MechanicalState |
Public Member Functions | |
| UnilateralInteractionConstraint (MechanicalState *object1, MechanicalState *object2) | |
| UnilateralInteractionConstraint (MechanicalState *object) | |
| UnilateralInteractionConstraint () | |
| virtual | ~UnilateralInteractionConstraint () |
| MechanicalState * | getObject1 () |
| MechanicalState * | getObject2 () |
| core::componentmodel::behavior::BaseMechanicalState * | getMechModel1 () |
| Get the first MechanicalState. | |
| core::componentmodel::behavior::BaseMechanicalState * | getMechModel2 () |
| Get the first MechanicalState. | |
| void | clear (int reserve=0) |
| virtual void | applyConstraint (unsigned int &, double &) |
| virtual void | addContact (double mu, Deriv norm, Coord P, Coord Q, Real contactDistance, int m1, int m2, Coord Pfree=Coord(), Coord Qfree=Coord(), long id=0) |
| virtual void | getConstraintValue (defaulttype::BaseVector *) |
| virtual void | getConstraintValue (double *) |
| virtual void | getConstraintId (long *id, unsigned int &offset) |
| virtual void | projectResponse () |
| Project dx to constrained space (dx models an acceleration). | |
| virtual void | projectVelocity () |
| Project v to constrained space (v models a velocity). | |
| virtual void | projectPosition () |
| Project x to constrained space (x models a position). | |
| virtual void | projectFreeVelocity () |
| Project vFree to constrained space (vFree models a velocity). | |
| virtual void | projectFreePosition () |
| Project xFree to constrained space (xFree models a position). | |
| virtual std::string | getTemplateName () const |
| Get the template type names (if any) used to instantiate this object. | |
| void | draw () |
| Render internal data of this object, for debugging purposes. | |
| bool | isHolonomic () |
| this constraint is NOT holonomic | |
Static Public Member Functions | |
| template<class T > | |
| static bool | canCreate (T *&obj, core::objectmodel::BaseContext *context, core::objectmodel::BaseObjectDescription *arg) |
| Pre-construction check method called by ObjectFactory. | |
| template<class T > | |
| static void | create (T *&obj, core::objectmodel::BaseContext *context, core::objectmodel::BaseObjectDescription *arg) |
| Construction method called by ObjectFactory. | |
| static std::string | templateName (const UnilateralInteractionConstraint< DataTypes > *=NULL) |
Data Fields | |
| unsigned int | constraintId |
Protected Attributes | |
| MechanicalState * | object1 |
| MechanicalState * | object2 |
| sofa::helper::vector< Contact > | contacts |
| Real | epsilon |
| bool | yetIntegrated |
Definition at line 18 of file UnilateralInteractionConstraint.h.
| typedef DataTypes::Coord sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::Coord |
Definition at line 26 of file UnilateralInteractionConstraint.h.
| typedef DataTypes::Deriv sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::Deriv |
Definition at line 27 of file UnilateralInteractionConstraint.h.
| typedef core::componentmodel::behavior::MechanicalState<DataTypes> sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::MechanicalState |
Definition at line 29 of file UnilateralInteractionConstraint.h.
| typedef Coord::value_type sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::Real |
Definition at line 28 of file UnilateralInteractionConstraint.h.
| typedef DataTypes::SparseDeriv sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::SparseDeriv |
Definition at line 25 of file UnilateralInteractionConstraint.h.
| typedef DataTypes::SparseVecDeriv sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::SparseVecDeriv |
Definition at line 24 of file UnilateralInteractionConstraint.h.
| typedef DataTypes::VecConst sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::VecConst |
Definition at line 23 of file UnilateralInteractionConstraint.h.
| typedef DataTypes::VecCoord sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::VecCoord |
Definition at line 21 of file UnilateralInteractionConstraint.h.
| typedef DataTypes::VecDeriv sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::VecDeriv |
Definition at line 22 of file UnilateralInteractionConstraint.h.
| sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::UnilateralInteractionConstraint | ( | MechanicalState * | object1, | |
| MechanicalState * | object2 | |||
| ) | [inline] |
Definition at line 63 of file UnilateralInteractionConstraint.h.
| sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::UnilateralInteractionConstraint | ( | MechanicalState * | object | ) | [inline] |
Definition at line 68 of file UnilateralInteractionConstraint.h.
| sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::UnilateralInteractionConstraint | ( | ) | [inline] |
Definition at line 73 of file UnilateralInteractionConstraint.h.
| virtual sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::~UnilateralInteractionConstraint | ( | ) | [inline, virtual] |
Definition at line 78 of file UnilateralInteractionConstraint.h.
| void sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::addContact | ( | double | mu, | |
| Deriv | norm, | |||
| Coord | P, | |||
| Coord | Q, | |||
| Real | contactDistance, | |||
| int | m1, | |||
| int | m2, | |||
| Coord | Pfree = Coord(), |
|||
| Coord | Qfree = Coord(), |
|||
| long | id = 0 | |||
| ) | [inline, virtual] |
Definition at line 17 of file UnilateralInteractionConstraint.inl.
References sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::Contact::contactId, sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::contacts, cross(), sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::Contact::delta, sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::Contact::dfree, sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::Contact::dfree_s, sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::Contact::dfree_t, dot(), sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::Contact::m1, sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::Contact::m2, sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::Contact::mu, sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::Contact::norm, sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::Contact::P, sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::Contact::Pfree, sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::Contact::Q, sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::Contact::Qfree, sofa::helper::rabs(), sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::Contact::s, and sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::Contact::t.
| void sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::applyConstraint | ( | unsigned int & | contactId, | |
| double & | mu | |||
| ) | [inline, virtual] |
Reimplemented from sofa::core::componentmodel::behavior::BaseConstraint.
Definition at line 88 of file UnilateralInteractionConstraint.inl.
References sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::contacts, sofa::core::componentmodel::behavior::MechanicalState< TDataTypes >::getC(), sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::Contact::id, sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::Contact::m1, sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::Contact::m2, sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::Contact::mu, sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::Contact::norm, sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::object1, sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::object2, sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::Contact::s, sofa::core::componentmodel::behavior::MechanicalState< TDataTypes >::setConstraintId(), and sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::Contact::t.
| static bool sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::canCreate | ( | T *& | obj, | |
| core::objectmodel::BaseContext * | context, | |||
| core::objectmodel::BaseObjectDescription * | arg | |||
| ) | [inline, static] |
Pre-construction check method called by ObjectFactory.
Reimplemented from sofa::core::objectmodel::BaseObject.
Definition at line 111 of file UnilateralInteractionConstraint.h.
Referenced by sofa::component::constraint::UnilateralInteractionConstraint< sofa::defaulttype::StdVectorTypes >::canCreate().
| void sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::clear | ( | int | reserve = 0 |
) | [inline] |
Definition at line 87 of file UnilateralInteractionConstraint.h.
| static void sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::create | ( | T *& | obj, | |
| core::objectmodel::BaseContext * | context, | |||
| core::objectmodel::BaseObjectDescription * | arg | |||
| ) | [inline, static] |
Construction method called by ObjectFactory.
Reimplemented from sofa::core::objectmodel::BaseObject.
Definition at line 130 of file UnilateralInteractionConstraint.h.
Referenced by sofa::component::constraint::UnilateralInteractionConstraint< sofa::defaulttype::StdVectorTypes >::create().
| void sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::draw | ( | ) | [inline, virtual] |
Render internal data of this object, for debugging purposes.
Reimplemented from sofa::core::objectmodel::BaseObject.
Definition at line 192 of file UnilateralInteractionConstraint.inl.
References sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::contacts, sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::Contact::dfree, sofa::core::objectmodel::BaseObject::getContext(), sofa::helper::gl::glVertexT(), sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::Contact::norm, sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::Contact::P, sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::Contact::Pfree, sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::Contact::Q, and sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::Contact::Qfree.
| void sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::getConstraintId | ( | long * | id, | |
| unsigned int & | offset | |||
| ) | [inline, virtual] |
Reimplemented from sofa::core::componentmodel::behavior::BaseConstraint.
Definition at line 168 of file UnilateralInteractionConstraint.inl.
References sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::Contact::contactId, sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::contacts, and sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::yetIntegrated.
| void sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::getConstraintValue | ( | double * | v | ) | [inline, virtual] |
Reimplemented from sofa::core::componentmodel::behavior::BaseConstraint.
Definition at line 153 of file UnilateralInteractionConstraint.inl.
References sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::contacts, sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::Contact::dfree, sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::Contact::dfree_s, sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::Contact::dfree_t, sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::Contact::id, and sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::Contact::mu.
| void sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::getConstraintValue | ( | defaulttype::BaseVector * | v | ) | [inline, virtual] |
Reimplemented from sofa::core::componentmodel::behavior::BaseConstraint.
Definition at line 138 of file UnilateralInteractionConstraint.inl.
References sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::contacts, sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::Contact::dfree, sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::Contact::dfree_s, sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::Contact::dfree_t, sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::Contact::id, sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::Contact::mu, and sofa::defaulttype::BaseVector::set().
| core::componentmodel::behavior::BaseMechanicalState* sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::getMechModel1 | ( | ) | [inline, virtual] |
Get the first MechanicalState.
Implements sofa::core::componentmodel::behavior::InteractionConstraint.
Definition at line 84 of file UnilateralInteractionConstraint.h.
| core::componentmodel::behavior::BaseMechanicalState* sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::getMechModel2 | ( | ) | [inline, virtual] |
Get the first MechanicalState.
Implements sofa::core::componentmodel::behavior::InteractionConstraint.
Definition at line 85 of file UnilateralInteractionConstraint.h.
| MechanicalState* sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::getObject1 | ( | ) | [inline] |
Definition at line 82 of file UnilateralInteractionConstraint.h.
| MechanicalState* sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::getObject2 | ( | ) | [inline] |
Definition at line 83 of file UnilateralInteractionConstraint.h.
| virtual std::string sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::getTemplateName | ( | ) | const [inline, virtual] |
Get the template type names (if any) used to instantiate this object.
Reimplemented from sofa::core::objectmodel::Base.
Definition at line 146 of file UnilateralInteractionConstraint.h.
| bool sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::isHolonomic | ( | ) | [inline, virtual] |
this constraint is NOT holonomic
Reimplemented from sofa::core::componentmodel::behavior::BaseConstraint.
Definition at line 158 of file UnilateralInteractionConstraint.h.
| virtual void sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::projectFreePosition | ( | ) | [inline, virtual] |
Project xFree to constrained space (xFree models a position).
Implements sofa::core::componentmodel::behavior::BaseConstraint.
Definition at line 107 of file UnilateralInteractionConstraint.h.
| virtual void sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::projectFreeVelocity | ( | ) | [inline, virtual] |
Project vFree to constrained space (vFree models a velocity).
Implements sofa::core::componentmodel::behavior::BaseConstraint.
Definition at line 106 of file UnilateralInteractionConstraint.h.
| virtual void sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::projectPosition | ( | ) | [inline, virtual] |
Project x to constrained space (x models a position).
Implements sofa::core::componentmodel::behavior::BaseConstraint.
Definition at line 105 of file UnilateralInteractionConstraint.h.
| virtual void sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::projectResponse | ( | ) | [inline, virtual] |
Project dx to constrained space (dx models an acceleration).
Implements sofa::core::componentmodel::behavior::BaseConstraint.
Definition at line 103 of file UnilateralInteractionConstraint.h.
| virtual void sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::projectVelocity | ( | ) | [inline, virtual] |
Project v to constrained space (v models a velocity).
Implements sofa::core::componentmodel::behavior::BaseConstraint.
Definition at line 104 of file UnilateralInteractionConstraint.h.
| static std::string sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::templateName | ( | const UnilateralInteractionConstraint< DataTypes > * | = NULL |
) | [inline, static] |
Definition at line 151 of file UnilateralInteractionConstraint.h.
Referenced by sofa::component::constraint::UnilateralInteractionConstraint< sofa::defaulttype::StdVectorTypes >::getTemplateName().
| unsigned int sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::constraintId |
Definition at line 61 of file UnilateralInteractionConstraint.h.
sofa::helper::vector<Contact> sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::contacts [protected] |
Definition at line 55 of file UnilateralInteractionConstraint.h.
Referenced by sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::addContact(), sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::applyConstraint(), sofa::component::constraint::UnilateralInteractionConstraint< sofa::defaulttype::StdVectorTypes >::clear(), sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::draw(), sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::getConstraintId(), and sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::getConstraintValue().
Real sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::epsilon [protected] |
Definition at line 56 of file UnilateralInteractionConstraint.h.
MechanicalState* sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::object1 [protected] |
Definition at line 32 of file UnilateralInteractionConstraint.h.
Referenced by sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::applyConstraint(), sofa::component::constraint::UnilateralInteractionConstraint< sofa::defaulttype::StdVectorTypes >::getMechModel1(), and sofa::component::constraint::UnilateralInteractionConstraint< sofa::defaulttype::StdVectorTypes >::getObject1().
MechanicalState* sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::object2 [protected] |
Definition at line 33 of file UnilateralInteractionConstraint.h.
Referenced by sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::applyConstraint(), sofa::component::constraint::UnilateralInteractionConstraint< sofa::defaulttype::StdVectorTypes >::getMechModel2(), and sofa::component::constraint::UnilateralInteractionConstraint< sofa::defaulttype::StdVectorTypes >::getObject2().
bool sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::yetIntegrated [protected] |
Definition at line 57 of file UnilateralInteractionConstraint.h.
Referenced by sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >::getConstraintId().
1.5.7.1