8 #include "IMovableItemCallback.h"
9 #include "ISimGUICallback.h"
13 #include "IPhysicsMovableItem.h"
14 #include "IPhysicsBody.h"
16 #include "MovableItem.h"
66 {
Std_TraceMsg(0,
"Caught Error in desctructor of Odor\r\n",
"", -1,
false,
true);}
112 CStdMap<std::string, Odor *>::iterator oPos;
116 lpOdor = oPos->second;
118 THROW_PARAM_ERROR(Al_Err_lOdorIDNotFound, Al_Err_strOdorIDNotFound,
"OdorID", strOdorID);
156 CStdMap<std::string, Odor *>::iterator oIterator;
164 lpOdor = oIterator->second;
171 bool OdorType::SetData(
const std::string &strDataType,
const std::string &strValue,
bool bThrowError)
178 if(strType ==
"DIFFUSIONCONSTANT")
186 THROW_PARAM_ERROR(Al_Err_lInvalidDataType, Al_Err_strInvalidDataType,
"Data Type", strDataType);
195 aryProperties.Add(
new TypeProperty(
"DiffusionConstant", AnimatPropertyType::Float, AnimatPropertyDirection::Set));
198 void OdorType::Load(
CStdXml &oXml)
Base class file for all Animat simulation objects.
Declares the simulation recorder class.
Root namespace for the base simulation library for AnimatLab.
Declares the body part class.
virtual ~OdorType()
Destructor.
Simulator * m_lpSim
The pointer to a Simulation.
virtual std::string ID()
Gets the unique GUID ID of this object.
virtual bool IntoElem()
Goes into the next element where the cursor is located.
Class that stores information about types for QueryProperty information.
virtual void DistanceUnits(std::string strUnits)
Sets the distance units.
Declares the key frame class.
Declares the joint class.
Declares the organism class.
bool Std_IsAboveMin(int iMinVal, int iVal, bool bThrowError, std::string strParamName, bool bInclusiveLimit)
Tests if a number is above a minimum value.
Declares the activated item class.
Declares a light manager object.
Declares the bounding box class.
float m_fltDiffusionConstant
The diffusion constant that defines how fast odors of this type move through the environment.
virtual float CalculateOdorValue(OdorType *lpType, CStdFPoint &oSensorPos)
Calculates the odor value for this Odorant for a given odor sensor somewhere in the environment...
A standard xml manipulation class.
virtual float DiffusionConstant()
Gets the diffusion constant.
virtual void QueryProperties(CStdPtrArray< TypeProperty > &aryProperties)
Queries this object for a list of properties that can be changed using SetData.
CStdMap< std::string, Odor * > m_aryOdorSources
The array of odor sources of this type within the environment.
virtual void Load(StdUtils::CStdXml &oXml)
Loads the item using an XML data packet.
void Std_TraceMsg(const int iLevel, std::string strMessage, std::string strSourceFile, int iSourceLine, bool bLogToFile, bool bPrintHeader)
Traces a message to the debugger window.
virtual bool SetData(const std::string &strDataType, const std::string &strValue, bool bThrowError=true)
Set a variable based on a string data type name.
virtual void AddOdorSource(Odor *lpOdor)
Adds an odor source to the list of odors that are emitting this type of odor.
OdorType()
Default constructor.
virtual bool OutOfElem()
Goes out of the element where the cursor is located.
virtual float CalculateOdorValue(CStdFPoint &oSensorPos)
Calculates the odor value for this OdorType for a given sensor location.
Declares the data chart manager class.
Declares the rigid body class.
std::string Std_CheckString(std::string strVal)
Converts a string to upper case and trims it.
Declares the structure class.
Declares the odor type class.
virtual void QueryProperties(CStdPtrArray< TypeProperty > &aryProperties)
Queries this object for a list of properties that can be changed using SetData.
Declares the simulator class.
virtual Odor * FindOdorSource(std::string strOdorID, bool bThrowError=true)
Finds the odor source with the specified GUID ID.
Declares the activated item manager class.
Declares the external stimuli manager class.
virtual bool SetData(const std::string &strDataType, const std::string &strValue, bool bThrowError=true)
Set a variable based on a string data type name.
Declares the receptive field class.
virtual float GetChildFloat(std::string strElementName)
Gets a float value from the element with the specified name.