8 #include "IMovableItemCallback.h"
9 #include "ISimGUICallback.h"
13 #include "IPhysicsMovableItem.h"
14 #include "IPhysicsBody.h"
16 #include "MovableItem.h"
482 void ActivatedItem::SetSliceData()
547 if(strType ==
"STARTTIME")
549 StartTime((
float) atof(strValue.c_str()));
553 if(strType ==
"ENDTIME")
555 EndTime((
float) atof(strValue.c_str()));
559 if(strType ==
"ALWAYSACTIVE")
565 if(strType ==
"STEPINTERVAL")
571 if(strType ==
"ENABLED")
579 THROW_PARAM_ERROR(Al_Err_lInvalidDataType, Al_Err_strInvalidDataType,
"Data Type", strDataType);
584 void ActivatedItem::Load(
CStdXml &oXml)
630 return lpItem1->operator<(lpItem2);
virtual ~ActivatedItem()
Destructor.
int m_iStepIntervalCount
Keeps track of how many time steps have occured since it was zeroed again.
Base class file for all Animat simulation objects.
virtual void Activate()
Activates this item.
Declares the simulation recorder class.
long m_lEndSlice
The time slice where this item is deactived.
virtual void ReInitialize()
Re-initialize this object.
bool LessThanActivatedItemCompare(ActivatedItem *lpItem1, ActivatedItem *lpItem2)
Compares the start times of two activated items to see which is sooner.
virtual bool FindChildElement(std::string strElementName, bool fThrowError=true)
Finds a child element by name.
Root namespace for the base simulation library for AnimatLab.
virtual int StepInterval()
Gets the step interval.
Declares the body part class.
Simulator * m_lpSim
The pointer to a Simulation.
virtual bool Enabled()
Gets whether the item is enabled or not.
virtual bool Paused()
Gets whether the Simulation is paused.
virtual bool IntoElem()
Goes into the next element where the cursor is located.
virtual void Initialize()
Initializes this object.
Declares the key frame class.
Base class for all activated items.
bool IsActivated()
Query if this object is activated.
Declares the joint class.
Declares the organism class.
virtual int GetChildInt(std::string strElementName)
Gets an integer value from the element with the specified name.
bool Std_IsAboveMin(int iMinVal, int iVal, bool bThrowError, std::string strParamName, bool bInclusiveLimit)
Tests if a number is above a minimum value.
virtual bool Overlaps(ActivatedItem *lpItem)
Query if this object overlaps the time period for another ActivatedItem.
Declares the activated item class.
virtual float TimeStep()
Gets the smallest integration time step used within the simulation.
ActivatedItem()
Default constructor.
Declares a light manager object.
Declares the bounding box class.
virtual long StartSlice()
Returns the starts slice for activation.
virtual float StartTime()
Gets the simulation start time for activation.
A standard xml manipulation class.
virtual int StepIntervalCount()
Gets the step interval count.
virtual void ResetSimulation()
Resets the simulation back to time 0.
bool NeedToActivate()
Determines if this item needs to be activated.
virtual bool SetData(const std::string &strDataType, const std::string &strValue, bool bThrowError=true)
Set a variable based on a string data type name.
bool Std_ToBool(int iVal)
Converts a value toa bool.
bool Std_IsBelowMax(int iMaxVal, int iVal, bool bThrowError, std::string strParamName, bool bInclusiveLimit)
Tests if a number is below a maximum value.
virtual void Load(StdUtils::CStdXml &oXml)
Loads the item using an XML data packet.
virtual bool GetChildBool(std::string strElementName)
Gets a bool value from the element with the specified name.
bool m_bEnabled
Tells if this item is enabled or not. If it is not enabled then it is not run.
bool m_bInitialized
true if item has been initialized
virtual long EndSlice()
Gets the end time slice for deactivation.
virtual bool OutOfElem()
Goes out of the element where the cursor is located.
virtual void Deactivate()
Deactivates this item.
bool IsInitialized()
Query if this object is initialized.
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.
virtual long TimeSlice()
Gets the current time slice.
Declares the structure class.
Declares the odor type class.
virtual void Initialize()
Initializes this object.
virtual bool NeedToStep()
Tells if this item needs to call StepSimulation or not.
virtual bool LoadedTime()
Gets whether time was loaded or time slices.
Declares the simulator class.
virtual void TimeStepModified()
Notification method that the time step modified has been modified. Objects should recalculate any sli...
Declares the activated item manager class.
Declares the external stimuli manager class.
bool m_bAlwaysActive
Determines whether this item is always active during simulation.
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 bool AlwaysActive()
Gets whether this item is always active.
long m_lStartSlice
The time slice where this item becomes active.
bool NeedToDeactivate()
Determines if this item needs to be deactivated.
virtual long GetChildLong(std::string strElementName)
Gets a long value from the element with the specified name.
Declares the receptive field class.
bool m_bIsActivated
true if item has been activated
virtual float GetChildFloat(std::string strElementName)
Gets a float value from the element with the specified name.
virtual float EndTime()
Gets the end simulation time for deactivation.