AnimatLab  2
Test
LinearHillMuscle.h
Go to the documentation of this file.
1 
7 #pragma once
8 
9 namespace AnimatSim
10 {
11  namespace Environment
12  {
13  namespace Bodies
14  {
15 
16 
49  class ANIMAT_PORT LinearHillMuscle : public MuscleBase
50  {
51  protected:
53  float m_fltKse;
54 
56  float m_fltKpe;
57 
59  float m_fltB;
60 
62  float m_fltKseByB;
63 
66 
69 
72 
75 
77  float m_fltSeLPrev;
78 
80  float m_fltPeLPrev;
81 
83  float m_fltVse;
84 
86  float m_fltVpe;
87 
90 
93 
95  float m_fltTL;
96 
98  float m_fltTLPerc;
99 
101  float m_fltAct;
102 
104  float m_fltA;
105 
107  float m_fltPrevA;
108 
111 
114 
117 
119  float m_fltIbRate;
120 
124 
127 
131 
132  //Averaged muscle velocity.
133  float m_fltAvgMuscleVel;
134 
135  float Ftl(float fltLce);
136  float Fact(float fltStim);
137  //float Tspring(float fltKq, float fltKl, float fltB, float fltLimit, float fltE);
138 
139  virtual void CalculateTension();
140 
141  public:
143  virtual ~LinearHillMuscle();
144 
145  static LinearHillMuscle *CastToDerived(AnimatBase *lpBase) {return static_cast<LinearHillMuscle*>(lpBase);}
146 
147  virtual float Kse();
148  virtual void Kse(float fltVal);
149 
150  virtual float Kpe();
151  virtual void Kpe(float fltVal);
152 
153  virtual float B();
154  virtual void B(float fltVal);
155 
156  virtual float RestingLength();
157  virtual void RestingLength(float fltVal);
158 
159  virtual float IbDischargeConstant();
160  virtual void IbDischargeConstant(float fltVal);
161 
162  virtual float SeLength();
163  virtual float PeLength();
164  virtual float Displacement();
165  virtual float DisplacementRatio();
166  virtual float TL();
167  virtual float Act();
168  virtual float A();
169  virtual float InternalTension();
170  virtual float Vmuscle();
171 
172  virtual void Enabled(bool bVal);
173 
174  virtual void CalculateInverseDynamics(float fltLength, float fltVelocity, float fltT, float &fltVm, float &fltA);
175 
176  virtual void ResetSimulation();
177  virtual void AfterResetSimulation();
178 
179  virtual void CreateJoints();
180  virtual float *GetDataPointer(const std::string &strDataType);
181  virtual bool SetData(const std::string &strDataType, const std::string &strValue, bool bThrowError = true);
182  virtual void QueryProperties(CStdPtrArray<TypeProperty> &aryProperties);
183 
184  virtual void Load(CStdXml &oXml);
185  };
186 
187  } //Bodies
188  } // Environment
189 } //AnimatSim
Root namespace for the base simulation library for AnimatLab.
float m_fltTLPerc
The Tl percentage. This is primarily used for reporting purposes. It is m_fltTl*100. It ranges from 0-100 %.
float m_fltVse
The velocity of change of the SE section of the muscle.
float m_fltSeLPrev
The previous length of the se section of the muscle.
float m_fltPrevA
Used to store the previous value of A when calculating the inverse muscle dynamics.
float m_fltPeLPrev
The previous length of the pe section of the muscle.
float m_fltDisplacementRatio
This is the ratio of displacement of this muscle from its resting length.
float m_fltSeLength
The length of the SE section of the muscle. The resting length is one half the total muscle length...
float m_fltA
The total active force that is developed from both the current stimulus level and the tension-length ...
float m_fltIbDischargeConstant
Constant that relates length of muscle segment to discharge rate of type Ib fibers.
float m_fltVpe
The velocity of change of the PE section of the muscle.
float m_fltSeDisplacement
The displacement of the SE section of the muscle.
float m_fltTL
The proportion of active force developed that can actually be used at this muscle length...
float m_fltKse
Spring constant for the series spring.
float m_fltAct
The active force that is developed from the current stimulus level before the tension-length relation...
float m_fltKseByB
Precalculation of Kse divided by B.
Animat base class.
Definition: AnimatBase.h:36
float m_fltVmuscle
The velocity of shortenting of the muscle.
int m_iMuscleVelAvgCount
The number of instantanious velocity readings to average to calculate the average velocity...
A muscle that is connected between two attachment points.
float m_fltDisplacement
This is the amount of displacement of this muscle from its resting length.
float m_fltKpeByKse
Precalculation of (1+(Kpe/Kse))
float m_fltKpe
Spring constant for the parrallel spring.
float m_fltPeLength
The length of the PE section of the muscle. The resting length is one half the total muscle length...