8 #include "IMovableItemCallback.h"
9 #include "ISimGUICallback.h"
13 #include "IPhysicsMovableItem.h"
14 #include "IPhysicsBody.h"
16 #include "MovableItem.h"
91 SetRelaxationProperties();
120 SetRelaxationProperties();
150 SetRelaxationProperties();
180 SetRelaxationProperties();
208 if(strType ==
"COORDINATEID")
214 if(strType ==
"STIFFNESS")
216 Stiffness((
float) atof(strValue.c_str()));
220 if(strType ==
"DAMPING")
222 Damping((
float) atof(strValue.c_str()));
226 if(strType ==
"ENABLED")
234 THROW_PARAM_ERROR(Al_Err_lInvalidDataType, Al_Err_strInvalidDataType,
"Data Type", strDataType);
243 aryProperties.Add(
new TypeProperty(
"CoordinateID", AnimatPropertyType::Integer, AnimatPropertyDirection::Set));
244 aryProperties.Add(
new TypeProperty(
"Enabled", AnimatPropertyType::Boolean, AnimatPropertyDirection::Both));
245 aryProperties.Add(
new TypeProperty(
"Damping", AnimatPropertyType::Float, AnimatPropertyDirection::Set));
246 aryProperties.Add(
new TypeProperty(
"Stiffness", AnimatPropertyType::Float, AnimatPropertyDirection::Set));
249 void ConstraintRelaxation::Load(
CStdXml &oXml)
Base class file for all Animat simulation objects.
Declares the simulation recorder class.
virtual int CoordinateID()
Gets the ID of the coordiante that this relaxation is associated with.
Root namespace for the base simulation library for AnimatLab.
virtual float InverseMassUnits()
Gets the inverse mass units.
Declares the body part class.
virtual float Stiffness()
Gets the Stiffness for collisions between RigidBodies with these two materials.
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 QueryProperties(CStdPtrArray< TypeProperty > &aryProperties)
Queries this object for a list of properties that can be changed using SetData.
Simulator * m_lpSim
The pointer to a Simulation.
int m_iCoordinateID
The constraint coordinate ID.
virtual bool IntoElem()
Goes into the next element where the cursor is located.
virtual ~ConstraintRelaxation()
Destructor.
Class that stores information about types for QueryProperty information.
Declares the key frame class.
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.
float m_fltDamping
The damping of the collision between those two materials.
float m_fltStiffness
The compliance of the collision between those two materials.
Declares the activated item class.
virtual float DisplayMassUnits()
Gets the density mass units.
Declares a light manager object.
Declares the bounding box class.
virtual bool Enabled()
Tells whether this item is enabled or not. This is not actually used for all objects, only specific ones. I am putting it in the base class though to prevent numerous duplications.
A standard xml manipulation class.
virtual void QueryProperties(CStdPtrArray< TypeProperty > &aryProperties)
Queries this object for a list of properties that can be changed using SetData.
bool Std_ToBool(int iVal)
Converts a value toa bool.
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.
virtual float Damping()
Gets the damping for collisions between RigidBodies with these two materials.
bool m_bEnabled
Tells if this item is enabled or not. If it is not enabled then it is not run.
virtual bool OutOfElem()
Goes out of the element where the cursor is located.
virtual void CreateDefaultUnits()
This takes the default values defined in the constructor and scales them according to the distance an...
Declares the sensor class.
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.
ConstraintRelaxation()
Default constructor.
Declares the simulator class.
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.