19 #ifndef _ROTATIONALSPRINGDAMPER_H_
20 #define _ROTATIONALSPRINGDAMPER_H_
22 #include "mbsim/link_mechanics.h"
23 #include "mbsim/utils/function.h"
25 #ifdef HAVE_OPENMBVCPPINTERFACE
43 fmatvec::Vec torqueDir, WtorqueDir;
44 #ifdef HAVE_OPENMBVCPPINTERFACE
45 OpenMBV::CoilSpring *coilspringOpenMBV;
49 void updateh(
double,
int i=0);
51 void updategd(
double);
58 std::string
getType()
const {
return "RotationalSpringDamper"; }
77 void plot(
double t,
double dt=1);
78 void initializeUsingXML(TiXmlElement *element);
80 #ifdef HAVE_OPENMBVCPPINTERFACE
82 void setOpenMBVSpring(OpenMBV::CoilSpring *spring_) {coilspringOpenMBV=spring_;}
85 void setOpenMBVForceArrow(OpenMBV::Arrow *arrow) {
86 std::vector<bool> which; which.resize(2,
true);
87 LinkMechanics::setOpenMBVForceArrow(arrow, which);
91 std::string saved_frameOfReference, saved_ref1, saved_ref2;
92 fmatvec::Vec saved_direction;