AnimatLab  2
Test
ContactAdapter.h
Go to the documentation of this file.
1 
7 #pragma once
8 
9 namespace AnimatSim
10 {
11  namespace Adapters
12  {
23  class ANIMAT_PORT ContactAdapter : public Adapter
24  {
25  protected:
27  std::string m_strSourceBodyID;
28 
30  std::string m_strTargetModule;
31 
33  CStdPtrArray<ReceptiveFieldPair> m_aryFieldPairs;
34 
35  ReceptiveFieldPair *LoadFieldPair(CStdXml &oXml);
36 
37  virtual void AddFieldPair(std::string strXml, bool bDoNotInit);
38  virtual void RemoveFieldPair(std::string strID, bool bThrowError = true);
39  virtual int FindFieldPairListPos(std::string strID, bool bThrowError = true);
40 
41  public:
43  virtual ~ContactAdapter();
44 
45  static ContactAdapter *CastToDerived(AnimatBase *lpBase) {return static_cast<ContactAdapter*>(lpBase);}
46 
47  virtual std::string SourceBodyID();
48  virtual void SourceBodyID(std::string strID);
49 
50  virtual std::string SourceModule();
51 
52  virtual std::string TargetModule();
53  virtual void TargetModule(std::string strModule);
54 
55 #pragma region DataAccesMethods
56 
57  virtual bool AddItem(const std::string &strItemType, const std::string &strXml, bool bThrowError = true, bool bDoNotInit = false);
58  virtual bool RemoveItem(const std::string &strItemType, const std::string &strID, bool bThrowError = true);
59 
60 #pragma endregion
61 
62  virtual void Initialize();
63  virtual void StepSimulation();
64  virtual void Load(CStdXml &oXml);
65  };
66 
67  } //Adapters
68 } //AnimatSim
Contact adapter that processes ReceptiveField contacts.
Root namespace for the base simulation library for AnimatLab.
std::string m_strSourceBodyID
GUID ID of the source RigidBody.
CStdPtrArray< ReceptiveFieldPair > m_aryFieldPairs
The array of ReceptiveFieldPair objects.
Animat base class.
Definition: AnimatBase.h:36
std::string m_strTargetModule
The name of the target NeuralModule.