AnimatLab  2
Test
VsMotorVelocityStimulus.h
Go to the documentation of this file.
1 
7 #pragma once
8 
9 namespace VortexAnimatSim
10 {
11  namespace ExternalStimuli
12  {
13 
15  {
16  protected:
17  std::string m_strStructureID;
18  std::string m_strJointID;
19  MotorizedJoint *m_lpJoint;
20  int m_iTargetID;
21 
22  float *m_lpPosition;
23  float *m_lpVelocity;
24 
25  std::string m_strVelocityEquation;
26  CStdPostFixEval *m_lpEval;
27 
28  bool m_bDisableMotorWhenDone;
29 
30  float m_fltVelocity;
31  float m_fltVelocityReport;
32 
33  public:
35  virtual ~VsMotorVelocityStimulus();
36 
37  std::string StructureID() {return m_strStructureID;};
38  void StructureID(std::string strVal) {m_strStructureID = strVal;};
39 
40  std::string JointID() {return m_strJointID;};
41  void JointID(std::string strVal) {m_strJointID = strVal;};
42 
43  std::string VelocityEquation() {return m_strVelocityEquation;};
44  void VelocityEquation(std::string strVal);
45 
46  bool DisableMotorWhenDone() {return m_bDisableMotorWhenDone;};
47  void DisableMotorWhenDone(bool bVal) {m_bDisableMotorWhenDone = bVal;};
48 
49  int TargetID() {return m_iTargetID;}
50  void TargetID(int iID);
51  void TargetID(std::string strID);
52 
53  virtual void Load(CStdXml &oXml);
54 
55  //ActiveItem overrides
56  virtual std::string Type() {return "MotorVelocity";};
57  virtual void Initialize();
58  virtual void Activate();
59  virtual void ResetSimulation();
60  virtual void StepSimulation();
61  virtual void Deactivate();
62 
63  virtual float *GetDataPointer(const std::string &strDataType);
64  virtual bool SetData(const std::string &strDataType, const std::string &strValue, bool bThrowError = true);
65  virtual void QueryProperties(CStdPtrArray<TypeProperty> &aryProperties);
66  };
67 
68  } //ExternalStimuli
69 } //VortexAnimatSim
Classes for implementing the cm-labs vortex physics engine for AnimatLab.
virtual std::string Type()
returns the string type name of this object.