AnimatLab  2
Test
OdorType.h
Go to the documentation of this file.
1 
7 #pragma once
8 
9 namespace AnimatSim
10 {
11  namespace Environment
12  {
13  class Odor;
14 
27  class ANIMAT_PORT OdorType : public AnimatBase
28  {
29  protected:
32 
34  CStdMap<std::string, Odor *> m_aryOdorSources;
35 
36  public:
37  OdorType();
38  virtual ~OdorType();
39 
40  static OdorType *CastToDerived(AnimatBase *lpBase) {return static_cast<OdorType*>(lpBase);}
41 
42  virtual float DiffusionConstant();
43  virtual void DiffusionConstant(float fltVal, bool bUseScaling = true);
44 
45  virtual Odor *FindOdorSource(std::string strOdorID, bool bThrowError = true);
46  virtual void AddOdorSource(Odor *lpOdor);
47 
48  virtual float CalculateOdorValue(CStdFPoint &oSensorPos);
49 
50  virtual bool SetData(const std::string &strDataType, const std::string &strValue, bool bThrowError = true);
51  virtual void QueryProperties(CStdPtrArray<TypeProperty> &aryProperties);
52 
53  virtual void Load(CStdXml &oXml);
54  };
55 
56  } // Environment
57 } //AnimatSim
Root namespace for the base simulation library for AnimatLab.
float m_fltDiffusionConstant
The diffusion constant that defines how fast odors of this type move through the environment.
Definition: OdorType.h:31
Odor type that can be emitted from a RigidBody and sensed by an OdorSensor.
Definition: OdorType.h:27
CStdMap< std::string, Odor * > m_aryOdorSources
The array of odor sources of this type within the environment.
Definition: OdorType.h:34
Animat base class.
Definition: AnimatBase.h:36