AnimatLab  2
Test
VsLinearHillStretchReceptor.cpp
1 // VsLinearHillStretchReceptor.cpp: implementation of the VsLinearHillStretchReceptor class.
2 //
4 
5 #include "StdAfx.h"
6 #include "VsMovableItem.h"
7 #include "VsBody.h"
8 #include "VsJoint.h"
9 #include "VsMotorizedJoint.h"
10 #include "VsRigidBody.h"
11 #include "VsLine.h"
12 #include "VsLinearHillStretchReceptor.h"
13 #include "VsSimulator.h"
14 #include "VsDragger.h"
15 
16 namespace VortexAnimatSim
17 {
18  namespace Environment
19  {
20  namespace Bodies
21  {
22 
24 // Construction/Destruction
26 
27 VsLinearHillStretchReceptor::VsLinearHillStretchReceptor()
28 {
29  SetThisPointers();
30 }
31 
32 VsLinearHillStretchReceptor::~VsLinearHillStretchReceptor()
33 {
34 
35  try
36  {
37  DeleteGraphics();
38  DeletePhysics();
39  }
40  catch(...)
41  {Std_TraceMsg(0, "Caught Error in desctructor of VsLinearHillStretchReceptor\r\n", "", -1, false, true);}
42 }
43 
44 void VsLinearHillStretchReceptor::CreateParts()
45 {
46  //We do nothing in createparts because we cannot build the line until after all parts are created
47  //so we can get a handle to the attachment points.
48 }
49 
51 {
52  LinearHillStretchReceptor::CreateJoints();
53  VsLine::CreateParts();
54 
58 }
59 
61 {
62  LinearHillStretchReceptor::ResetSimulation();
63  VsLine::ResetSimulation();
64 }
65 
66 void VsLinearHillStretchReceptor::AfterResetSimulation()
67 {
68  LinearHillStretchReceptor::AfterResetSimulation();
69  VsLine::AfterResetSimulation();
70 }
71 
73 {
75 
76  VsLine::StepSimulation(m_fltTension);
77 }
78 
79  } //Bodies
80  } // Environment
81 } //VortexAnimatSim
82 
float m_fltIIDischargeConstant
Constant that relates length of muscle segment to discharge rate of type II fibers.
float m_fltSeLength
The length of the SE section of the muscle. The resting length is one half the total muscle length...
virtual void StepSimulation()
Step the simulation for this object.
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 ResetSimulation()
Resets the simulation back to time 0.
Classes for implementing the cm-labs vortex physics engine for AnimatLab.
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
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...