AnimatLab  2
Test
Odor.h
Go to the documentation of this file.
1 
7 #pragma once
8 
9 namespace AnimatSim
10 {
11  namespace Environment
12  {
19  class ANIMAT_PORT Odor : public AnimatBase
20  {
21  protected:
24 
27 
30 
34 
35  public:
36  Odor(RigidBody *lpParent);
37  virtual ~Odor();
38 
39  static Odor *CastToDerived(AnimatBase *lpBase) {return static_cast<Odor*>(lpBase);}
40 
41  virtual void Enabled(bool bEnabled);
42  virtual bool Enabled();
43 
44  virtual void SetOdorType(std::string strType);
45  virtual OdorType *GetOdorType();
46 
47  virtual float Quantity();
48  virtual void Quantity(float fltVal);
49 
50  virtual bool UseFoodQuantity();
51  virtual void UseFoodQuantity(bool bVal);
52 
53  virtual float CalculateOdorValue(OdorType *lpType, CStdFPoint &oSensorPos);
54 
55  virtual bool SetData(const std::string &strDataType, const std::string &strValue, bool bThrowError = true);
56  virtual void QueryProperties(CStdPtrArray<TypeProperty> &aryProperties);
57 
58  virtual void Load(CStdXml &oXml);
59  };
60 
61  } // Environment
62 } //AnimatSim
Root namespace for the base simulation library for AnimatLab.
RigidBody * m_lpParent
Pointer to the parent RigidBody part that is emitting the odor.
Definition: Odor.h:23
OdorType * m_lpOdorType
Pointer to the type of odor the body part is emitting.
Definition: Odor.h:26
float m_fltQuantity
The quantity used to calculate the odor value.
Definition: Odor.h:29
Odor type that can be emitted from a RigidBody and sensed by an OdorSensor.
Definition: OdorType.h:27
Animat base class.
Definition: AnimatBase.h:36
The base class for all of the basic rigid body type of objects.
Definition: RigidBody.h:66