#include <PairInteractionConstraint.h>


Public Types | |
| typedef TDataTypes | DataTypes |
| typedef DataTypes::VecCoord | VecCoord |
| typedef DataTypes::VecDeriv | VecDeriv |
| typedef DataTypes::VecConst | VecConst |
| typedef DataTypes::Coord | Coord |
| typedef DataTypes::Deriv | Deriv |
| typedef DataTypes::Real | Real |
Public Member Functions | |
| PairInteractionConstraint (MechanicalState< DataTypes > *mm1=NULL, MechanicalState< DataTypes > *mm2=NULL) | |
| virtual | ~PairInteractionConstraint () |
| virtual bool | isActive () const |
| if false, the constraint does nothing | |
| virtual void | init () |
| Initialization method called at graph modification, during bottom-up traversal. | |
| MechanicalState< DataTypes > * | getMState1 () |
| Retrieve the associated MechanicalState. | |
| BaseMechanicalState * | getMechModel1 () |
| Get the first MechanicalState. | |
| MechanicalState< DataTypes > * | getMState2 () |
| Retrieve the associated MechanicalState. | |
| BaseMechanicalState * | getMechModel2 () |
| Get the first MechanicalState. | |
| virtual void | applyConstraint (unsigned int &contactId) |
| virtual void | applyConstraint (VecConst &, VecConst &, 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 (VecDeriv &dx1, VecDeriv &dx2)=0 |
| Project dx to constrained space (dx models an acceleration). | |
| virtual void | projectVelocity (VecDeriv &v1, VecDeriv &v2)=0 |
| Project v to constrained space (v models a velocity). | |
| virtual void | projectPosition (VecCoord &x1, VecCoord &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 PairInteractionConstraint< DataTypes > *=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< DataTypes > * | mstate1 |
| MechanicalState< DataTypes > * | 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 PairInteractionConstraint.h.
| typedef DataTypes::Coord sofa::core::componentmodel::behavior::PairInteractionConstraint< TDataTypes >::Coord |
Reimplemented in sofa::component::constraint::AttachConstraint< DataTypes >.
Definition at line 59 of file PairInteractionConstraint.h.
| typedef TDataTypes sofa::core::componentmodel::behavior::PairInteractionConstraint< TDataTypes >::DataTypes |
Definition at line 55 of file PairInteractionConstraint.h.
| typedef DataTypes::Deriv sofa::core::componentmodel::behavior::PairInteractionConstraint< TDataTypes >::Deriv |
Reimplemented in sofa::component::constraint::AttachConstraint< DataTypes >.
Definition at line 60 of file PairInteractionConstraint.h.
| typedef DataTypes::Real sofa::core::componentmodel::behavior::PairInteractionConstraint< TDataTypes >::Real |
Reimplemented in sofa::component::constraint::AttachConstraint< DataTypes >.
Definition at line 61 of file PairInteractionConstraint.h.
| typedef DataTypes::VecConst sofa::core::componentmodel::behavior::PairInteractionConstraint< TDataTypes >::VecConst |
Definition at line 58 of file PairInteractionConstraint.h.
| typedef DataTypes::VecCoord sofa::core::componentmodel::behavior::PairInteractionConstraint< TDataTypes >::VecCoord |
Reimplemented in sofa::component::constraint::AttachConstraint< DataTypes >.
Definition at line 56 of file PairInteractionConstraint.h.
| typedef DataTypes::VecDeriv sofa::core::componentmodel::behavior::PairInteractionConstraint< TDataTypes >::VecDeriv |
Reimplemented in sofa::component::constraint::AttachConstraint< DataTypes >.
Definition at line 57 of file PairInteractionConstraint.h.
| sofa::core::componentmodel::behavior::PairInteractionConstraint< DataTypes >::PairInteractionConstraint | ( | MechanicalState< DataTypes > * | mm1 = NULL, |
|
| MechanicalState< DataTypes > * | mm2 = NULL | |||
| ) | [inline] |
Definition at line 46 of file PairInteractionConstraint.inl.
| sofa::core::componentmodel::behavior::PairInteractionConstraint< DataTypes >::~PairInteractionConstraint | ( | ) | [inline, virtual] |
Definition at line 55 of file PairInteractionConstraint.inl.
| virtual void sofa::core::componentmodel::behavior::PairInteractionConstraint< TDataTypes >::applyConstraint | ( | VecConst & | , | |
| VecConst & | , | |||
| unsigned int & | ||||
| ) | [inline, virtual] |
Definition at line 140 of file PairInteractionConstraint.h.
| void sofa::core::componentmodel::behavior::PairInteractionConstraint< DataTypes >::applyConstraint | ( | unsigned int & | contactId | ) | [inline, virtual] |
Definition at line 117 of file PairInteractionConstraint.inl.
| static bool sofa::core::componentmodel::behavior::PairInteractionConstraint< TDataTypes >::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 145 of file PairInteractionConstraint.h.
Referenced by sofa::core::componentmodel::behavior::PairInteractionConstraint< DataTypes >::canCreate().
| static void sofa::core::componentmodel::behavior::PairInteractionConstraint< TDataTypes >::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 PairInteractionConstraint.h.
Referenced by sofa::core::componentmodel::behavior::PairInteractionConstraint< DataTypes >::create().
| BaseMechanicalState* sofa::core::componentmodel::behavior::PairInteractionConstraint< TDataTypes >::getMechModel1 | ( | ) | [inline, virtual] |
Get the first MechanicalState.
Implements sofa::core::componentmodel::behavior::InteractionConstraint.
Definition at line 74 of file PairInteractionConstraint.h.
| BaseMechanicalState* sofa::core::componentmodel::behavior::PairInteractionConstraint< TDataTypes >::getMechModel2 | ( | ) | [inline, virtual] |
Get the first MechanicalState.
Implements sofa::core::componentmodel::behavior::InteractionConstraint.
Definition at line 77 of file PairInteractionConstraint.h.
| MechanicalState<DataTypes>* sofa::core::componentmodel::behavior::PairInteractionConstraint< TDataTypes >::getMState1 | ( | ) | [inline] |
| MechanicalState<DataTypes>* sofa::core::componentmodel::behavior::PairInteractionConstraint< TDataTypes >::getMState2 | ( | ) | [inline] |
| virtual std::string sofa::core::componentmodel::behavior::PairInteractionConstraint< TDataTypes >::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 180 of file PairInteractionConstraint.h.
| void sofa::core::componentmodel::behavior::PairInteractionConstraint< DataTypes >::init | ( | ) | [inline, virtual] |
Initialization method called at graph modification, during bottom-up traversal.
Reimplemented from sofa::core::objectmodel::BaseObject.
Reimplemented in sofa::component::constraint::AttachConstraint< DataTypes >.
Definition at line 60 of file PairInteractionConstraint.inl.
References sofa::core::objectmodel::BaseObject::getContext(), sofa::core::componentmodel::behavior::PairInteractionConstraint< TDataTypes >::mstate1, and sofa::core::componentmodel::behavior::PairInteractionConstraint< TDataTypes >::mstate2.
| bool sofa::core::componentmodel::behavior::PairInteractionConstraint< DataTypes >::isActive | ( | ) | const [inline, virtual] |
if false, the constraint does nothing
Definition at line 70 of file PairInteractionConstraint.inl.
Referenced by sofa::core::componentmodel::behavior::PairInteractionConstraint< TDataTypes >::projectFreePosition(), sofa::core::componentmodel::behavior::PairInteractionConstraint< TDataTypes >::projectPosition(), and sofa::core::componentmodel::behavior::PairInteractionConstraint< TDataTypes >::projectResponse().
| void sofa::core::componentmodel::behavior::PairInteractionConstraint< DataTypes >::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(VecCoord&,VecCoord&) method implemented by the component.
Implements sofa::core::componentmodel::behavior::BaseConstraint.
Definition at line 109 of file PairInteractionConstraint.inl.
References sofa::core::componentmodel::behavior::MechanicalState< TDataTypes >::getXfree(), sofa::core::componentmodel::behavior::PairInteractionConstraint< TDataTypes >::isActive(), sofa::core::componentmodel::behavior::PairInteractionConstraint< TDataTypes >::mstate1, sofa::core::componentmodel::behavior::PairInteractionConstraint< TDataTypes >::mstate2, and sofa::core::componentmodel::behavior::PairInteractionConstraint< TDataTypes >::projectPosition().
| void sofa::core::componentmodel::behavior::PairInteractionConstraint< DataTypes >::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(VecDeriv&,VecDeriv&) method implemented by the component.
Implements sofa::core::componentmodel::behavior::BaseConstraint.
Definition at line 101 of file PairInteractionConstraint.inl.
| virtual void sofa::core::componentmodel::behavior::PairInteractionConstraint< TDataTypes >::projectPosition | ( | VecCoord & | x1, | |
| VecCoord & | 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.
Implemented in sofa::component::constraint::AttachConstraint< DataTypes >.
| void sofa::core::componentmodel::behavior::PairInteractionConstraint< DataTypes >::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(VecCoord&,VecCoord&) method implemented by the component.
Implements sofa::core::componentmodel::behavior::BaseConstraint.
Definition at line 93 of file PairInteractionConstraint.inl.
References sofa::core::componentmodel::behavior::MechanicalState< TDataTypes >::getX(), sofa::core::componentmodel::behavior::PairInteractionConstraint< TDataTypes >::isActive(), sofa::core::componentmodel::behavior::PairInteractionConstraint< TDataTypes >::mstate1, and sofa::core::componentmodel::behavior::PairInteractionConstraint< TDataTypes >::mstate2.
Referenced by sofa::core::componentmodel::behavior::PairInteractionConstraint< TDataTypes >::projectFreePosition().
| virtual void sofa::core::componentmodel::behavior::PairInteractionConstraint< TDataTypes >::projectResponse | ( | VecDeriv & | dx1, | |
| VecDeriv & | 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.
Implemented in sofa::component::constraint::AttachConstraint< DataTypes >.
| void sofa::core::componentmodel::behavior::PairInteractionConstraint< DataTypes >::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(VecDeriv&,VecDeriv&) method implemented by the component.
Implements sofa::core::componentmodel::behavior::BaseConstraint.
Definition at line 77 of file PairInteractionConstraint.inl.
References sofa::core::componentmodel::behavior::MechanicalState< TDataTypes >::getDx(), sofa::core::componentmodel::behavior::PairInteractionConstraint< TDataTypes >::isActive(), sofa::core::componentmodel::behavior::PairInteractionConstraint< TDataTypes >::mstate1, and sofa::core::componentmodel::behavior::PairInteractionConstraint< TDataTypes >::mstate2.
| virtual void sofa::core::componentmodel::behavior::PairInteractionConstraint< TDataTypes >::projectVelocity | ( | VecDeriv & | v1, | |
| VecDeriv & | 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.
Implemented in sofa::component::constraint::AttachConstraint< DataTypes >.
| void sofa::core::componentmodel::behavior::PairInteractionConstraint< DataTypes >::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(VecDeriv&,VecDeriv&) method implemented by the component.
Implements sofa::core::componentmodel::behavior::BaseConstraint.
Definition at line 85 of file PairInteractionConstraint.inl.
| static std::string sofa::core::componentmodel::behavior::PairInteractionConstraint< TDataTypes >::templateName | ( | const PairInteractionConstraint< DataTypes > * | = NULL |
) | [inline, static] |
Definition at line 185 of file PairInteractionConstraint.h.
Referenced by sofa::core::componentmodel::behavior::PairInteractionConstraint< DataTypes >::getTemplateName().
| Data<double> sofa::core::componentmodel::behavior::PairInteractionConstraint< TDataTypes >::endTime |
Time when the constraint becomes inactive (-1 for infinitely active).
Definition at line 67 of file PairInteractionConstraint.h.
MechanicalState<DataTypes>* sofa::core::componentmodel::behavior::PairInteractionConstraint< TDataTypes >::mstate1 [protected] |
Definition at line 193 of file PairInteractionConstraint.h.
Referenced by sofa::core::componentmodel::behavior::PairInteractionConstraint< DataTypes >::getMechModel1(), sofa::core::componentmodel::behavior::PairInteractionConstraint< DataTypes >::getMState1(), sofa::core::componentmodel::behavior::PairInteractionConstraint< TDataTypes >::init(), sofa::core::componentmodel::behavior::PairInteractionConstraint< TDataTypes >::projectFreePosition(), sofa::core::componentmodel::behavior::PairInteractionConstraint< TDataTypes >::projectPosition(), and sofa::core::componentmodel::behavior::PairInteractionConstraint< TDataTypes >::projectResponse().
MechanicalState<DataTypes>* sofa::core::componentmodel::behavior::PairInteractionConstraint< TDataTypes >::mstate2 [protected] |
Definition at line 194 of file PairInteractionConstraint.h.
Referenced by sofa::core::componentmodel::behavior::PairInteractionConstraint< DataTypes >::getMechModel2(), sofa::core::componentmodel::behavior::PairInteractionConstraint< DataTypes >::getMState2(), sofa::core::componentmodel::behavior::PairInteractionConstraint< TDataTypes >::init(), sofa::core::componentmodel::behavior::PairInteractionConstraint< TDataTypes >::projectFreePosition(), sofa::core::componentmodel::behavior::PairInteractionConstraint< TDataTypes >::projectPosition(), and sofa::core::componentmodel::behavior::PairInteractionConstraint< TDataTypes >::projectResponse().
Data< std::string > sofa::core::componentmodel::behavior::PairInteractionConstraint< TDataTypes >::object1 [protected] |
Definition at line 191 of file PairInteractionConstraint.h.
Data< std::string > sofa::core::componentmodel::behavior::PairInteractionConstraint< TDataTypes >::object2 [protected] |
Definition at line 192 of file PairInteractionConstraint.h.
1.5.7.1