AnimatLab  2
Test
Mouth.h
Go to the documentation of this file.
1 
7 #pragma once
8 
9 namespace AnimatSim
10 {
11  namespace Environment
12  {
13  namespace Bodies
14  {
25  class ANIMAT_PORT Mouth : public Sensor
26  {
27  protected:
30 
32  std::string m_strStomachID;
33 
38 
41 
44 
45  virtual void SetStomachPointer(std::string strID);
46 
47  public:
48  Mouth();
49  virtual ~Mouth();
50 
51  static Mouth *CastToDerived(AnimatBase *lpBase) {return static_cast<Mouth*>(lpBase);}
52 
53  virtual float EatingRate();
54 
63  virtual float MinFoodRadius();
64 
74  virtual void MinFoodRadius(float fltVal, bool bUseScaling = true);
75 
76  virtual void StomachID(std::string strID);
77  virtual std::string StomachID();
78 
79  //Node Overrides
80  virtual void Initialize();
81  virtual void AddExternalNodeInput(int iTargetDataType, float fltInput);
82  virtual bool SetData(const std::string &strDataType, const std::string &strValue, bool bThrowError = true);
83  virtual void QueryProperties(CStdPtrArray<TypeProperty> &aryProperties);
84  virtual float *GetDataPointer(const std::string &strDataType);
85  virtual void StepSimulation();
86  virtual void ResetSimulation();
87  virtual void Load(CStdXml &oXml);
88  };
89 
90  } //Joints
91  } // Environment
92 } //AnimatSim
Root namespace for the base simulation library for AnimatLab.
The Stomach object is responsible for holding food energy.
Definition: Stomach.h:26
Stomach * m_lpStomach
The pointer to stomach for this organism.
Definition: Mouth.h:29
The Mouth part type.
Definition: Mouth.h:25
Animat base class.
Definition: AnimatBase.h:36
float m_fltMinFoodRadius
Any food source that is further away than this minimum radius will not be available for eating...
Definition: Mouth.h:40
float m_fltFoodDistance
The current distance between the food and the mouth.
Definition: Mouth.h:43
std::string m_strStomachID
Identifier for the stomach.
Definition: Mouth.h:32