AnimatLab  2
Test
RbLinearHillStretchReceptor.cpp
1 // RbLinearHillStretchReceptor.cpp: implementation of the RbLinearHillStretchReceptor class.
2 //
4 
5 #include "StdAfx.h"
6 #include "RbMovableItem.h"
7 #include "RbBody.h"
8 #include "RbJoint.h"
9 #include "RbMotorizedJoint.h"
10 #include "RbRigidBody.h"
11 #include "RbLine.h"
12 #include "RbLinearHillStretchReceptor.h"
13 #include "RbSimulator.h"
14 
15 namespace RoboticsAnimatSim
16 {
17  namespace Environment
18  {
19  namespace Bodies
20  {
21 
23 // Construction/Destruction
25 
26 RbLinearHillStretchReceptor::RbLinearHillStretchReceptor()
27 {
28  SetThisPointers();
29 }
30 
31 RbLinearHillStretchReceptor::~RbLinearHillStretchReceptor()
32 {
33 
34  try
35  {
36  }
37  catch(...)
38  {Std_TraceMsg(0, "Caught Error in desctructor of RbLinearHillStretchReceptor\r\n", "", -1, false, true);}
39 }
40 
41 void RbLinearHillStretchReceptor::CreateParts()
42 {
43  //We do nothing in createparts because we cannot build the line until after all parts are created
44  //so we can get a handle to the attachment points.
45 }
46 
48 {
49  LinearHillStretchReceptor::CreateJoints();
50  RbLine::CreateParts();
51 
55 }
56 
58 {
59  LinearHillStretchReceptor::ResetSimulation();
60  RbLine::ResetSimulation();
61 }
62 
63 void RbLinearHillStretchReceptor::AfterResetSimulation()
64 {
65  LinearHillStretchReceptor::AfterResetSimulation();
66  RbLine::AfterResetSimulation();
67 }
68 
70 {
72 
73  RbLine::StepSimulation(m_fltTension);
74 }
75 
76  } //Bodies
77  } // Environment
78 } //RoboticsAnimatSim
79 
float m_fltIIDischargeConstant
Constant that relates length of muscle segment to discharge rate of type II fibers.
virtual void CreateJoints()
Allows the rigid body to create its joints using the chosen physics engine.
float m_fltSeLength
The length of the SE section of the muscle. The resting length is one half the total muscle length...
float m_fltIbDischargeConstant
Constant that relates length of muscle segment to discharge rate of type Ib fibers.
virtual void StepSimulation()
Step the simulation for this object.
void Std_TraceMsg(const int iLevel, std::string strMessage, std::string strSourceFile, int iSourceLine, bool bLogToFile, bool bPrintHeader)
Traces a message to the debugger window.
float m_fltTension
Tension of the muscle.
Definition: MuscleBase.h:39
Classes for implementing the cm-labs vortex physics engine for AnimatLab.
virtual void ResetSimulation()
Resets the simulation back to time 0.
float m_fltIaDischargeConstant
Constant that relates length of muscle segment to discharge rate of type Ia fibers.
float m_fltPeLength
The length of the PE section of the muscle. The resting length is one half the total muscle length...