#include <MixedInteractionConstraint.h>


Public Types | |
| typedef TDataTypes1 | DataTypes1 |
| typedef DataTypes1::VecCoord | VecCoord1 |
| typedef DataTypes1::VecDeriv | VecDeriv1 |
| typedef DataTypes1::VecConst | VecConst1 |
| typedef DataTypes1::Coord | Coord1 |
| typedef DataTypes1::Deriv | Deriv1 |
| typedef TDataTypes2 | DataTypes2 |
| typedef DataTypes2::VecCoord | VecCoord2 |
| typedef DataTypes2::VecDeriv | VecDeriv2 |
| typedef DataTypes2::VecConst | VecConst2 |
| typedef DataTypes2::Coord | Coord2 |
| typedef DataTypes2::Deriv | Deriv2 |
Public Member Functions | |
| MixedInteractionConstraint (MechanicalState< DataTypes1 > *mm1=NULL, MechanicalState< DataTypes2 > *mm2=NULL) | |
| virtual | ~MixedInteractionConstraint () |
| virtual bool | isActive () const |
| if false, the constraint does nothing | |
| virtual void | init () |
| Initialization method called at graph modification, during bottom-up traversal. | |
| MechanicalState< DataTypes1 > * | getMState1 () |
| Retrieve the associated MechanicalState. | |
| BaseMechanicalState * | getMechModel1 () |
| Get the first MechanicalState. | |
| MechanicalState< DataTypes2 > * | getMState2 () |
| Retrieve the associated MechanicalState. | |
| BaseMechanicalState * | getMechModel2 () |
| Get the first MechanicalState. | |
| virtual void | applyConstraint (unsigned int &contactId) |
| virtual void | applyConstraint (VecConst1 &, VecConst2 &, unsigned int &) |
| virtual std::string | getTemplateName () const |
| Get the template type names (if any) used to instantiate this object. | |
Vector operations | |
| 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 void | projectResponse (VecDeriv1 &dx1, VecDeriv2 &dx2)=0 |
| Project dx to constrained space (dx models an acceleration). | |
| virtual void | projectVelocity (VecDeriv1 &v1, VecDeriv2 &v2)=0 |
| Project v to constrained space (v models a velocity). | |
| virtual void | projectPosition (VecCoord1 &x1, VecCoord2 &x2)=0 |
| Project x to constrained space (x models a position). | |
Static Public Member Functions | |
| template<class T > | |
| static bool | canCreate (T *&obj, objectmodel::BaseContext *context, 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 MixedInteractionConstraint< DataTypes1, DataTypes2 > *=NULL) |
Data Fields | |
| Data< double > | endTime |
| Time when the constraint becomes inactive (-1 for infinitely active). | |
Protected Attributes | |
| Data< std::string > | object1 |
| Data< std::string > | object2 |
| MechanicalState< DataTypes1 > * | mstate1 |
| MechanicalState< DataTypes2 > * | mstate2 |
This class define the abstract API common to interaction constraints between a pair of bodies using a given type of DOFs.
Definition at line 52 of file MixedInteractionConstraint.h.
| typedef DataTypes1::Coord sofa::core::componentmodel::behavior::MixedInteractionConstraint< TDataTypes1, TDataTypes2 >::Coord1 |
Definition at line 59 of file MixedInteractionConstraint.h.
| typedef DataTypes2::Coord sofa::core::componentmodel::behavior::MixedInteractionConstraint< TDataTypes1, TDataTypes2 >::Coord2 |
Definition at line 65 of file MixedInteractionConstraint.h.
| typedef TDataTypes1 sofa::core::componentmodel::behavior::MixedInteractionConstraint< TDataTypes1, TDataTypes2 >::DataTypes1 |
Definition at line 55 of file MixedInteractionConstraint.h.
| typedef TDataTypes2 sofa::core::componentmodel::behavior::MixedInteractionConstraint< TDataTypes1, TDataTypes2 >::DataTypes2 |
Definition at line 61 of file MixedInteractionConstraint.h.
| typedef DataTypes1::Deriv sofa::core::componentmodel::behavior::MixedInteractionConstraint< TDataTypes1, TDataTypes2 >::Deriv1 |
Definition at line 60 of file MixedInteractionConstraint.h.
| typedef DataTypes2::Deriv sofa::core::componentmodel::behavior::MixedInteractionConstraint< TDataTypes1, TDataTypes2 >::Deriv2 |
Definition at line 66 of file MixedInteractionConstraint.h.
| typedef DataTypes1::VecConst sofa::core::componentmodel::behavior::MixedInteractionConstraint< TDataTypes1, TDataTypes2 >::VecConst1 |
Definition at line 58 of file MixedInteractionConstraint.h.
| typedef DataTypes2::VecConst sofa::core::componentmodel::behavior::MixedInteractionConstraint< TDataTypes1, TDataTypes2 >::VecConst2 |
Definition at line 64 of file MixedInteractionConstraint.h.
| typedef DataTypes1::VecCoord sofa::core::componentmodel::behavior::MixedInteractionConstraint< TDataTypes1, TDataTypes2 >::VecCoord1 |
Definition at line 56 of file MixedInteractionConstraint.h.
| typedef DataTypes2::VecCoord sofa::core::componentmodel::behavior::MixedInteractionConstraint< TDataTypes1, TDataTypes2 >::VecCoord2 |
Definition at line 62 of file MixedInteractionConstraint.h.
| typedef DataTypes1::VecDeriv sofa::core::componentmodel::behavior::MixedInteractionConstraint< TDataTypes1, TDataTypes2 >::VecDeriv1 |
Definition at line 57 of file MixedInteractionConstraint.h.
| typedef DataTypes2::VecDeriv sofa::core::componentmodel::behavior::MixedInteractionConstraint< TDataTypes1, TDataTypes2 >::VecDeriv2 |
Definition at line 63 of file MixedInteractionConstraint.h.
| sofa::core::componentmodel::behavior::MixedInteractionConstraint< DataTypes1, DataTypes2 >::MixedInteractionConstraint | ( | MechanicalState< DataTypes1 > * | mm1 = NULL, |
|
| MechanicalState< DataTypes2 > * | mm2 = NULL | |||
| ) | [inline] |
Definition at line 46 of file MixedInteractionConstraint.inl.
| sofa::core::componentmodel::behavior::MixedInteractionConstraint< DataTypes1, DataTypes2 >::~MixedInteractionConstraint | ( | ) | [inline, virtual] |
Definition at line 55 of file MixedInteractionConstraint.inl.
| virtual void sofa::core::componentmodel::behavior::MixedInteractionConstraint< TDataTypes1, TDataTypes2 >::applyConstraint | ( | VecConst1 & | , | |
| VecConst2 & | , | |||
| unsigned int & | ||||
| ) | [inline, virtual] |
Definition at line 145 of file MixedInteractionConstraint.h.
| void sofa::core::componentmodel::behavior::MixedInteractionConstraint< DataTypes1, DataTypes2 >::applyConstraint | ( | unsigned int & | contactId | ) | [inline, virtual] |
Definition at line 113 of file MixedInteractionConstraint.inl.
References sofa::core::componentmodel::behavior::MechanicalState< TDataTypes >::getC(), sofa::core::componentmodel::behavior::MixedInteractionConstraint< TDataTypes1, TDataTypes2 >::isActive(), sofa::core::componentmodel::behavior::MixedInteractionConstraint< TDataTypes1, TDataTypes2 >::mstate1, and sofa::core::componentmodel::behavior::MixedInteractionConstraint< TDataTypes1, TDataTypes2 >::mstate2.
| static bool sofa::core::componentmodel::behavior::MixedInteractionConstraint< TDataTypes1, TDataTypes2 >::canCreate | ( | T *& | obj, | |
| objectmodel::BaseContext * | context, | |||
| objectmodel::BaseObjectDescription * | arg | |||
| ) | [inline, static] |
Pre-construction check method called by ObjectFactory.
Check that DataTypes matches the MechanicalState.
Reimplemented from sofa::core::objectmodel::BaseObject.
Definition at line 150 of file MixedInteractionConstraint.h.
References sofa::core::objectmodel::BaseObjectDescription::findObject(), and sofa::core::objectmodel::BaseObjectDescription::getAttribute().
| static void sofa::core::componentmodel::behavior::MixedInteractionConstraint< TDataTypes1, TDataTypes2 >::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 164 of file MixedInteractionConstraint.h.
References sofa::core::objectmodel::BaseObjectDescription::findObject(), and sofa::core::objectmodel::BaseObjectDescription::getAttribute().
| BaseMechanicalState* sofa::core::componentmodel::behavior::MixedInteractionConstraint< TDataTypes1, TDataTypes2 >::getMechModel1 | ( | ) | [inline, virtual] |
Get the first MechanicalState.
Implements sofa::core::componentmodel::behavior::InteractionConstraint.
Definition at line 79 of file MixedInteractionConstraint.h.
References sofa::core::componentmodel::behavior::MixedInteractionConstraint< TDataTypes1, TDataTypes2 >::mstate1.
| BaseMechanicalState* sofa::core::componentmodel::behavior::MixedInteractionConstraint< TDataTypes1, TDataTypes2 >::getMechModel2 | ( | ) | [inline, virtual] |
Get the first MechanicalState.
Implements sofa::core::componentmodel::behavior::InteractionConstraint.
Definition at line 82 of file MixedInteractionConstraint.h.
References sofa::core::componentmodel::behavior::MixedInteractionConstraint< TDataTypes1, TDataTypes2 >::mstate2.
| MechanicalState<DataTypes1>* sofa::core::componentmodel::behavior::MixedInteractionConstraint< TDataTypes1, TDataTypes2 >::getMState1 | ( | ) | [inline] |
Retrieve the associated MechanicalState.
Definition at line 78 of file MixedInteractionConstraint.h.
References sofa::core::componentmodel::behavior::MixedInteractionConstraint< TDataTypes1, TDataTypes2 >::mstate1.
| MechanicalState<DataTypes2>* sofa::core::componentmodel::behavior::MixedInteractionConstraint< TDataTypes1, TDataTypes2 >::getMState2 | ( | ) | [inline] |
Retrieve the associated MechanicalState.
Definition at line 81 of file MixedInteractionConstraint.h.
References sofa::core::componentmodel::behavior::MixedInteractionConstraint< TDataTypes1, TDataTypes2 >::mstate2.
| virtual std::string sofa::core::componentmodel::behavior::MixedInteractionConstraint< TDataTypes1, TDataTypes2 >::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 174 of file MixedInteractionConstraint.h.
References sofa::core::componentmodel::behavior::MixedInteractionConstraint< TDataTypes1, TDataTypes2 >::templateName().
| void sofa::core::componentmodel::behavior::MixedInteractionConstraint< DataTypes1, DataTypes2 >::init | ( | ) | [inline, virtual] |
Initialization method called at graph modification, during bottom-up traversal.
Reimplemented from sofa::core::objectmodel::BaseObject.
Definition at line 60 of file MixedInteractionConstraint.inl.
| bool sofa::core::componentmodel::behavior::MixedInteractionConstraint< DataTypes1, DataTypes2 >::isActive | ( | ) | const [inline, virtual] |
if false, the constraint does nothing
Definition at line 66 of file MixedInteractionConstraint.inl.
References sofa::core::componentmodel::behavior::MixedInteractionConstraint< TDataTypes1, TDataTypes2 >::endTime, and sofa::core::objectmodel::BaseObject::getContext().
Referenced by sofa::core::componentmodel::behavior::MixedInteractionConstraint< TDataTypes1, TDataTypes2 >::applyConstraint(), sofa::core::componentmodel::behavior::MixedInteractionConstraint< TDataTypes1, TDataTypes2 >::projectFreePosition(), sofa::core::componentmodel::behavior::MixedInteractionConstraint< TDataTypes1, TDataTypes2 >::projectFreeVelocity(), sofa::core::componentmodel::behavior::MixedInteractionConstraint< TDataTypes1, TDataTypes2 >::projectPosition(), sofa::core::componentmodel::behavior::MixedInteractionConstraint< TDataTypes1, TDataTypes2 >::projectResponse(), and sofa::core::componentmodel::behavior::MixedInteractionConstraint< TDataTypes1, TDataTypes2 >::projectVelocity().
| void sofa::core::componentmodel::behavior::MixedInteractionConstraint< DataTypes1, DataTypes2 >::projectFreePosition | ( | ) | [inline, virtual] |
Project xFree to constrained space (xFree models a position).
This method retrieves the xFree vector from the MechanicalState and call the internal projectPosition(VecCoord1&,VecCoord2&) method implemented by the component.
Implements sofa::core::componentmodel::behavior::BaseConstraint.
Definition at line 105 of file MixedInteractionConstraint.inl.
References sofa::core::componentmodel::behavior::MechanicalState< TDataTypes >::getXfree(), sofa::core::componentmodel::behavior::MixedInteractionConstraint< TDataTypes1, TDataTypes2 >::isActive(), sofa::core::componentmodel::behavior::MixedInteractionConstraint< TDataTypes1, TDataTypes2 >::mstate1, sofa::core::componentmodel::behavior::MixedInteractionConstraint< TDataTypes1, TDataTypes2 >::mstate2, and sofa::core::componentmodel::behavior::MixedInteractionConstraint< TDataTypes1, TDataTypes2 >::projectPosition().
| void sofa::core::componentmodel::behavior::MixedInteractionConstraint< DataTypes1, DataTypes2 >::projectFreeVelocity | ( | ) | [inline, virtual] |
Project vFree to constrained space (vFree models a velocity).
This method retrieves the vFree vector from the MechanicalState and call the internal projectVelocity(VecDeriv1&,VecDeriv2&) method implemented by the component.
Implements sofa::core::componentmodel::behavior::BaseConstraint.
Definition at line 97 of file MixedInteractionConstraint.inl.
References sofa::core::componentmodel::behavior::MechanicalState< TDataTypes >::getVfree(), sofa::core::componentmodel::behavior::MixedInteractionConstraint< TDataTypes1, TDataTypes2 >::isActive(), sofa::core::componentmodel::behavior::MixedInteractionConstraint< TDataTypes1, TDataTypes2 >::mstate1, sofa::core::componentmodel::behavior::MixedInteractionConstraint< TDataTypes1, TDataTypes2 >::mstate2, and sofa::core::componentmodel::behavior::MixedInteractionConstraint< TDataTypes1, TDataTypes2 >::projectVelocity().
| virtual void sofa::core::componentmodel::behavior::MixedInteractionConstraint< TDataTypes1, TDataTypes2 >::projectPosition | ( | VecCoord1 & | x1, | |
| VecCoord2 & | x2 | |||
| ) | [pure 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.
| void sofa::core::componentmodel::behavior::MixedInteractionConstraint< DataTypes1, DataTypes2 >::projectPosition | ( | ) | [inline, virtual] |
Project x to constrained space (x models a position).
This method retrieves the x vector from the MechanicalState and call the internal projectPosition(VecCoord1&,VecCoord2&) method implemented by the component.
Implements sofa::core::componentmodel::behavior::BaseConstraint.
Definition at line 89 of file MixedInteractionConstraint.inl.
References sofa::core::componentmodel::behavior::MechanicalState< TDataTypes >::getX(), sofa::core::componentmodel::behavior::MixedInteractionConstraint< TDataTypes1, TDataTypes2 >::isActive(), sofa::core::componentmodel::behavior::MixedInteractionConstraint< TDataTypes1, TDataTypes2 >::mstate1, and sofa::core::componentmodel::behavior::MixedInteractionConstraint< TDataTypes1, TDataTypes2 >::mstate2.
Referenced by sofa::core::componentmodel::behavior::MixedInteractionConstraint< TDataTypes1, TDataTypes2 >::projectFreePosition().
| virtual void sofa::core::componentmodel::behavior::MixedInteractionConstraint< TDataTypes1, TDataTypes2 >::projectResponse | ( | VecDeriv1 & | dx1, | |
| VecDeriv2 & | dx2 | |||
| ) | [pure 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.
| void sofa::core::componentmodel::behavior::MixedInteractionConstraint< DataTypes1, DataTypes2 >::projectResponse | ( | ) | [inline, virtual] |
Project dx to constrained space (dx models an acceleration).
This method retrieves the dx vector from the MechanicalState and call the internal projectResponse(VecDeriv1&,VecDeriv2&) method implemented by the component.
Implements sofa::core::componentmodel::behavior::BaseConstraint.
Definition at line 73 of file MixedInteractionConstraint.inl.
References sofa::core::componentmodel::behavior::MechanicalState< TDataTypes >::getDx(), sofa::core::componentmodel::behavior::MixedInteractionConstraint< TDataTypes1, TDataTypes2 >::isActive(), sofa::core::componentmodel::behavior::MixedInteractionConstraint< TDataTypes1, TDataTypes2 >::mstate1, and sofa::core::componentmodel::behavior::MixedInteractionConstraint< TDataTypes1, TDataTypes2 >::mstate2.
| virtual void sofa::core::componentmodel::behavior::MixedInteractionConstraint< TDataTypes1, TDataTypes2 >::projectVelocity | ( | VecDeriv1 & | v1, | |
| VecDeriv2 & | v2 | |||
| ) | [pure 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.
| void sofa::core::componentmodel::behavior::MixedInteractionConstraint< DataTypes1, DataTypes2 >::projectVelocity | ( | ) | [inline, virtual] |
Project v to constrained space (v models a velocity).
This method retrieves the v vector from the MechanicalState and call the internal projectVelocity(VecDeriv1&,VecDeriv2&) method implemented by the component.
Implements sofa::core::componentmodel::behavior::BaseConstraint.
Definition at line 81 of file MixedInteractionConstraint.inl.
References sofa::core::componentmodel::behavior::MechanicalState< TDataTypes >::getV(), sofa::core::componentmodel::behavior::MixedInteractionConstraint< TDataTypes1, TDataTypes2 >::isActive(), sofa::core::componentmodel::behavior::MixedInteractionConstraint< TDataTypes1, TDataTypes2 >::mstate1, and sofa::core::componentmodel::behavior::MixedInteractionConstraint< TDataTypes1, TDataTypes2 >::mstate2.
Referenced by sofa::core::componentmodel::behavior::MixedInteractionConstraint< TDataTypes1, TDataTypes2 >::projectFreeVelocity().
| static std::string sofa::core::componentmodel::behavior::MixedInteractionConstraint< TDataTypes1, TDataTypes2 >::templateName | ( | const MixedInteractionConstraint< DataTypes1, DataTypes2 > * | = NULL |
) | [inline, static] |
Definition at line 179 of file MixedInteractionConstraint.h.
Referenced by sofa::core::componentmodel::behavior::MixedInteractionConstraint< TDataTypes1, TDataTypes2 >::getTemplateName().
| Data<double> sofa::core::componentmodel::behavior::MixedInteractionConstraint< TDataTypes1, TDataTypes2 >::endTime |
Time when the constraint becomes inactive (-1 for infinitely active).
Definition at line 72 of file MixedInteractionConstraint.h.
Referenced by sofa::core::componentmodel::behavior::MixedInteractionConstraint< TDataTypes1, TDataTypes2 >::isActive().
MechanicalState<DataTypes1>* sofa::core::componentmodel::behavior::MixedInteractionConstraint< TDataTypes1, TDataTypes2 >::mstate1 [protected] |
Definition at line 187 of file MixedInteractionConstraint.h.
Referenced by sofa::core::componentmodel::behavior::MixedInteractionConstraint< TDataTypes1, TDataTypes2 >::applyConstraint(), sofa::core::componentmodel::behavior::MixedInteractionConstraint< TDataTypes1, TDataTypes2 >::getMechModel1(), sofa::core::componentmodel::behavior::MixedInteractionConstraint< TDataTypes1, TDataTypes2 >::getMState1(), sofa::core::componentmodel::behavior::MixedInteractionConstraint< TDataTypes1, TDataTypes2 >::projectFreePosition(), sofa::core::componentmodel::behavior::MixedInteractionConstraint< TDataTypes1, TDataTypes2 >::projectFreeVelocity(), sofa::core::componentmodel::behavior::MixedInteractionConstraint< TDataTypes1, TDataTypes2 >::projectPosition(), sofa::core::componentmodel::behavior::MixedInteractionConstraint< TDataTypes1, TDataTypes2 >::projectResponse(), and sofa::core::componentmodel::behavior::MixedInteractionConstraint< TDataTypes1, TDataTypes2 >::projectVelocity().
MechanicalState<DataTypes2>* sofa::core::componentmodel::behavior::MixedInteractionConstraint< TDataTypes1, TDataTypes2 >::mstate2 [protected] |
Definition at line 188 of file MixedInteractionConstraint.h.
Referenced by sofa::core::componentmodel::behavior::MixedInteractionConstraint< TDataTypes1, TDataTypes2 >::applyConstraint(), sofa::core::componentmodel::behavior::MixedInteractionConstraint< TDataTypes1, TDataTypes2 >::getMechModel2(), sofa::core::componentmodel::behavior::MixedInteractionConstraint< TDataTypes1, TDataTypes2 >::getMState2(), sofa::core::componentmodel::behavior::MixedInteractionConstraint< TDataTypes1, TDataTypes2 >::projectFreePosition(), sofa::core::componentmodel::behavior::MixedInteractionConstraint< TDataTypes1, TDataTypes2 >::projectFreeVelocity(), sofa::core::componentmodel::behavior::MixedInteractionConstraint< TDataTypes1, TDataTypes2 >::projectPosition(), sofa::core::componentmodel::behavior::MixedInteractionConstraint< TDataTypes1, TDataTypes2 >::projectResponse(), and sofa::core::componentmodel::behavior::MixedInteractionConstraint< TDataTypes1, TDataTypes2 >::projectVelocity().
Data< std::string > sofa::core::componentmodel::behavior::MixedInteractionConstraint< TDataTypes1, TDataTypes2 >::object1 [protected] |
Definition at line 185 of file MixedInteractionConstraint.h.
Data< std::string > sofa::core::componentmodel::behavior::MixedInteractionConstraint< TDataTypes1, TDataTypes2 >::object2 [protected] |
Definition at line 186 of file MixedInteractionConstraint.h.
1.5.7.1