19 #ifndef TG_RB_STRING_H
20 #define TG_RB_STRING_H
36 #include "core/tgBaseString.h"
55 Config( std::size_t segments,
57 const tgBaseString::Config& stringConf,
58 double minTotalLength = 0.1);
60 std::size_t m_segments;
62 tgBaseString::Config m_stringConfig;
63 double m_minTotalLength;
78 virtual void step(
double dt);
80 void changeMuscles (
double lengthPercent,
double dt);
82 virtual void teardown();
84 virtual void moveMotors(
double dt);
86 virtual void tensionMinLengthController(
const double targetTension,
89 virtual const double getStartLength()
const;
96 virtual const double getCurrentLength()
const;
98 virtual const double getTension()
const;
100 virtual const double getRestLength()
const;
102 virtual const double getVelocity()
const;
104 const int getSegments()
const
106 return m_config.m_segments;
111 const double computeVelocity(
const double dt)
const;
113 void logHistory(
const double dt);
116 std::vector<tgLinearString*> allMuscles;
117 std::vector<tgRod*> allSegments;
123 double m_effectiveStiffness;
128 #endif // TG_RB_STRING_TEST_H
Definition of tgSubject class.
Contains the definition of class tgModel.
virtual void setup(tgWorld &world)
Contains the definition of class tgRod.