|
Computer Assited Medical Intervention Tool Kit
version 5.0
|
|
Go to the documentation of this file.
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>
51 typedef typename DataTypes::VecCoord
VecCoord;
52 typedef typename DataTypes::VecDeriv
VecDeriv;
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;
114 #endif // SIMULATOR_SIMULATORS_SOFA_TRANSLATIONCONSTRAINT_H
~TranslationConstraint()
Definition: TranslationConstraint.h:86
DataTypes::Coord Coord
Definition: TranslationConstraint.h:78
void draw()
– VisualModel interface
std::vector< Load * > loads
the lml loads
Definition: TranslationConstraint.h:132
VecDeriv directionsNULLs
list of fixed directions
Definition: TranslationConstraint.h:126
virtual void projectVelocity(VecDeriv &v)
project dx to constrained space (dx models a velocity)
DataTypes::VecCoord VecCoord
template types
Definition: TranslationConstraint.h:74
DataTypes::VecCoord::iterator VecCoordIterator
Definition: TranslationConstraint.h:76
DataTypes::VecDeriv::iterator VecDerivIterator
Definition: TranslationConstraint.h:77
TranslationConstraint< DataTypes > * removeConstraint(int index)
sofa::core::behavior::MechanicalState< DataTypes > * mmodel
the mechanical model
Definition: TranslationConstraint.h:120
void initTextures()
Definition: TranslationConstraint.h:106
virtual void projectPosition(VecCoord &x)
project x to constrained space (x models a position)
double initTime
initial time
Definition: TranslationConstraint.h:130
VecDeriv translations
list of translations
Definition: TranslationConstraint.h:124
This class makes it possible to manage a list of "Load". Remember that Load is an abstract class (con...
Definition: Loads.h:71
DataTypes::VecDeriv VecDeriv
Definition: TranslationConstraint.h:75
std::vector< unsigned int > targets
the set of vertex targets
Definition: TranslationConstraint.h:122
TODO Comment class here.
Definition: TranslationConstraint.h:48
void setInitTime(double time)
set initial time (context->getTime() remind the same when simulation is rewind)
TranslationConstraint< DataTypes > * addConstraint(unsigned int index, Deriv trans)
fix or translate a point
VecDeriv initPos
initial positions
Definition: TranslationConstraint.h:128
void fixDOF(int index, int axe)
fix a point on the axe specified (0=x, 1=y, 2=z)
std::vector< unsigned int > getTargets()
return the targets list
Definition: TranslationConstraint.h:89
std::map< unsigned int, unsigned int > atomToDOFIndexes
link between PML object indexes and sofa Dofs Indexes
Definition: TranslationConstraint.h:134
DataTypes::MatrixDeriv::RowType MatrixDerivRowType
Definition: TranslationConstraint.h:81
DataTypes::Deriv Deriv
Definition: TranslationConstraint.h:79
void projectResponse(VecDeriv &dx)
Constraint inherits.
TranslationConstraint(Loads *loadsList, const std::map< unsigned int, unsigned int > &atomIndexToDOFIndex, sofa::core::behavior::MechanicalState< DataTypes > *mm)
constructor
void update()
Definition: TranslationConstraint.h:107