AnimatLab  2
Test
BlLinearHillStretchReceptor.cpp
1 // BlLinearHillStretchReceptor.cpp: implementation of the BlLinearHillStretchReceptor class.
2 //
4 
5 #include "StdAfx.h"
6 #include "BlJoint.h"
7 #include "BlMotorizedJoint.h"
8 #include "BlRigidBody.h"
9 #include "BlLine.h"
10 #include "BlLinearHillStretchReceptor.h"
11 #include "BlSimulator.h"
12 
13 namespace BulletAnimatSim
14 {
15  namespace Environment
16  {
17  namespace Bodies
18  {
19 
21 // Construction/Destruction
23 
24 BlLinearHillStretchReceptor::BlLinearHillStretchReceptor()
25 {
26  SetThisPointers();
27 }
28 
29 BlLinearHillStretchReceptor::~BlLinearHillStretchReceptor()
30 {
31 
32  try
33  {
34  DeleteGraphics();
35  DeletePhysics(false);
36  }
37  catch(...)
38  {Std_TraceMsg(0, "Caught Error in desctructor of BlLinearHillStretchReceptor\r\n", "", -1, false, true);}
39 }
40 
41 void BlLinearHillStretchReceptor::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  BlLine::CreateParts();
51 
55 }
56 
58 {
59  LinearHillStretchReceptor::ResetSimulation();
60  BlLine::ResetSimulation();
61 }
62 
63 void BlLinearHillStretchReceptor::AfterResetSimulation()
64 {
65  LinearHillStretchReceptor::AfterResetSimulation();
66  BlLine::AfterResetSimulation();
67 }
68 
70 {
72 
73  BlLine::StepSimulation(m_fltTension);
74 }
75 
76  } //Bodies
77  } // Environment
78 } //BulletAnimatSim
79 
float m_fltIIDischargeConstant
Constant that relates length of muscle segment to discharge rate of type II fibers.
Classes for implementing the cm-labs vortex physics engine for AnimatLab.
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 CreateJoints()
Allows the rigid body to create its joints using the chosen physics engine.
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.
virtual void ResetSimulation()
Resets the simulation back to time 0.
float m_fltTension
Tension of the muscle.
Definition: MuscleBase.h:39
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...