19 #ifndef _EXTERNGENERALIZEDIO_H_
20 #define _EXTERNGENERALIZEDIO_H_
22 #include "mbsim/link.h"
32 std::string saved_ref;
37 std::vector<ApplyForceAlsoTo> applyForceAlsoTo;
43 void updateh(
double,
int i=0);
45 void updategd(
double);
48 void updatedx(
double t,
double dt);
49 void updatexd(
double t);
53 std::string
getType()
const {
return "ExternGeneralizedIO"; }
56 void connect(
Object *obj,
int qInd_,
int uInd_) { connectedObject=obj; qInd=qInd_; uInd=uInd_; }
57 void setGeneralizedForce(
double h) { la(0)=
h; }
58 void setGeneralizedLinearForceParameters(
double m_,
double a_,
double t0_) { m=m_; a=a_; t0=t0_; }
59 double getGeneralizedPosition() {
return g(0); }
60 double getGeneralizedVelocity() {
return gd(0); }
62 void plot(
double t,
double dt=1);
63 void initializeUsingXML(TiXmlElement *element);
69 virtual void updatedhdqRef(
const fmatvec::Mat&,
int) {}
70 virtual void updatedhduRef(
const fmatvec::SqrMat&,
int) {}
71 virtual void updatedhdtRef(
const fmatvec::Vec&,
int) {}
74 void addApplyForceAlsoTo(
Object *ref,
double factor,
int index);
77 std::string saved_connectedObject;