26 #ifndef SIMULATOR_SIMULATORS_SOFA_TRANSLATIONCONSTRAINT_H
27 #define SIMULATOR_SIMULATORS_SOFA_TRANSLATIONCONSTRAINT_H
30 #include "sofa/core/behavior/ProjectiveConstraintSet.h"
31 #include "sofa/core/behavior/MechanicalState.h"
39 template<
class DataTypes>
55 typedef typename DataTypes::Coord
Coord;
56 typedef typename DataTypes::Deriv
Deriv;
61 TranslationConstraint(
Loads* loadsList,
const std::map<unsigned int, unsigned int>& atomIndexToDOFIndex, sofa::core::behavior::MechanicalState<DataTypes>* mm);
95 void fixDOF(
int index,
int axe);
97 sofa::core::behavior::MechanicalState<DataTypes>* mmodel;
99 std::vector<unsigned int> targets;
109 std::vector<Load*> loads;
111 std::map<unsigned int, unsigned int> atomToDOFIndexes;
This class makes it possible to manage a list of "Load".
Definition: Loads.h:71
TODO Comment class here.
Definition: TranslationConstraint.h:48
DataTypes::VecDeriv::iterator VecDerivIterator
Definition: TranslationConstraint.h:54
std::vector< unsigned int > getTargets()
return the targets list
Definition: TranslationConstraint.h:66
TranslationConstraint(Loads *loadsList, const std::map< unsigned int, unsigned int > &atomIndexToDOFIndex, sofa::core::behavior::MechanicalState< DataTypes > *mm)
constructor
DataTypes::VecDeriv VecDeriv
Definition: TranslationConstraint.h:52
DataTypes::MatrixDeriv::RowType MatrixDerivRowType
Definition: TranslationConstraint.h:58
TranslationConstraint< DataTypes > * addConstraint(unsigned int index, Deriv trans)
fix or translate a point
DataTypes::Coord Coord
Definition: TranslationConstraint.h:55
void setInitTime(double time)
set initial time (context->getTime() remind the same when simulation is rewind)
virtual void projectPosition(VecCoord &x)
project x to constrained space (x models a position)
DataTypes::VecCoord VecCoord
template types
Definition: TranslationConstraint.h:51
DataTypes::VecCoord::iterator VecCoordIterator
Definition: TranslationConstraint.h:53
void initTextures()
Definition: TranslationConstraint.h:83
void projectResponse(VecDeriv &dx)
Constraint inherits.
TranslationConstraint< DataTypes > * removeConstraint(int index)
~TranslationConstraint()
Definition: TranslationConstraint.h:63
void draw()
– VisualModel interface
void projectResponse(MatrixDerivRowType &dx)
Definition: TranslationConstraint.h:79
void update()
Definition: TranslationConstraint.h:84
virtual void projectVelocity(VecDeriv &v)
project dx to constrained space (dx models a velocity)
DataTypes::Deriv Deriv
Definition: TranslationConstraint.h:56