18 #ifndef _SIMBODY_LINK_HH_
19 #define _SIMBODY_LINK_HH_
48 public:
virtual void Load(sdf::ElementPtr _ptr);
51 public:
virtual void Init();
54 public:
virtual void Fini();
57 public:
virtual void OnPoseChange();
60 public:
virtual void SetEnabled(
bool enable)
const;
63 public:
virtual bool GetEnabled()
const;
69 public:
virtual void SetAngularVel(
const math::Vector3 &_vel);
99 public:
virtual void SetGravityMode(
bool _mode);
102 public:
virtual bool GetGravityMode()
const;
105 public:
virtual void SetSelfCollide(
bool _collide);
108 public:
virtual void SetLinearDamping(
double _damping);
111 public:
virtual void SetAngularDamping(
double _damping);
117 public:
virtual void AddRelativeForce(
const math::Vector3 &_force);
120 public:
virtual void AddForceAtWorldPosition(
const math::Vector3 &_force,
124 public:
virtual void AddForceAtRelativePosition(
129 public:
virtual void AddTorque(
const math::Vector3 &_torque);
132 public:
virtual void AddRelativeTorque(
const math::Vector3 &_torque);
135 public:
virtual void SetAutoDisable(
bool _disable);
138 public:
virtual void SaveSimbodyState(
const SimTK::State &_state);
141 public:
virtual void RestoreSimbodyState(SimTK::State &_state);
148 public:
virtual void SetLinkStatic(
bool _static);
153 public: SimTK::MassProperties GetMassProperties()
const;
155 public: SimTK::MassProperties GetEffectiveMassProps(
156 int _numFragments)
const;
158 public:
void SetDirtyPose(
const math::Pose &_pose);
162 private:
void ProcessSetGravityMode();
166 private:
void ProcessSetLinkStatic();
187 private:
bool gravityMode;
190 private:
bool staticLinkDirty;
193 private:
bool gravityModeDirty;
196 private:
bool staticLink;
205 private: std::vector<double> simbodyQ;
208 private: std::vector<double> simbodyU;