AnimatLab  2
Test
PropertyControlStimulus.h
Go to the documentation of this file.
1 
7 #pragma once
8 
9 namespace AnimatSim
10 {
11  namespace ExternalStimuli
12  {
19  class ANIMAT_PORT PropertyControlStimulus : public ExternalStimulus
20  {
21  protected:
23  std::string m_strTargetID;
24 
27 
28  float m_fltPreviousSetVal;
29  float m_fltSetThreshold;
30  float m_fltInitialValue;
31  float m_fltFinalValue;
32 
33  std::string m_strEquation;
34  CStdPostFixEval *m_lpEval;
35 
36  std::string m_strPropertyName;
37  AnimatPropertyType m_ePropertyType;
38 
39  virtual void SetPropertyValue(float fltVal);
40 
41  public:
43  virtual ~PropertyControlStimulus();
44 
45  static PropertyControlStimulus *CastToDerived(AnimatBase *lpBase) {return static_cast<PropertyControlStimulus*>(lpBase);}
46 
47  virtual std::string Type();
48 
49  virtual std::string TargetID();
50  virtual void TargetID(std::string strID);
51 
52  virtual AnimatBase *TargetObject();
53 
54  virtual void PropertyName(std::string strPropName);
55  virtual std::string PropertyName();
56 
57  virtual void SetThreshold(float fltThreshold);
58  virtual float SetThreshold();
59 
60  virtual void InitialValue(float fltVal);
61  virtual float InitialValue();
62 
63  virtual void FinalValue(float fltVal);
64  virtual float FinalValue();
65 
66  std::string Equation() {return m_strEquation;};
67  void Equation(std::string strVal);
68 
69  virtual void Initialize();
70  virtual void Activate();
71  virtual void StepSimulation();
72  virtual void Deactivate();
73  virtual bool SetData(const std::string &strDataType, const std::string &strValue, bool bThrowError = true);
74  virtual void QueryProperties(CStdPtrArray<TypeProperty> &aryProperties);
75 
76  virtual void Load(CStdXml &oXml);
77 
78  };
79 
80  } //ExternalStimuli
81 } //VortexAnimatSim
Root namespace for the base simulation library for AnimatLab.
std::string m_strTargetID
GUID ID of the target node to enable.
This stimulus enables or disables a joint or body part for a specified period of time.
Animat base class.
Definition: AnimatBase.h:36
AnimatBase * m_lpTargetObject
Pointer to the target node.