8 #include "IMovableItemCallback.h"
9 #include "ISimGUICallback.h"
13 #include "IPhysicsMovableItem.h"
14 #include "IPhysicsBody.h"
16 #include "MovableItem.h"
46 #include "LinearHillStretchReceptor.h"
120 Std_InValidRange((
float) 0, (
float) 1e11, fltVal,
true,
"IaDischargeConstant");
144 Std_InValidRange((
float) 0, (
float) 1e11, fltVal,
true,
"IIDischargeConstant");
184 float *LinearHillStretchReceptor::GetDataPointer(
const std::string &strDataType)
188 float *lpData = NULL;
192 else if(strType ==
"IB")
194 else if(strType ==
"II")
197 lpData = LinearHillMuscle::GetDataPointer(strDataType);
202 bool LinearHillStretchReceptor::SetData(
const std::string &strDataType,
const std::string &strValue,
bool bThrowError)
204 if(LinearHillMuscle::SetData(strDataType, strValue,
false))
207 if(strDataType ==
"APPLYTENSION")
213 if(strDataType ==
"IADISCHARGE")
219 if(strDataType ==
"IIDISCHARGE")
227 THROW_PARAM_ERROR(Al_Err_lInvalidDataType, Al_Err_strInvalidDataType,
"Data Type", strDataType);
232 void LinearHillStretchReceptor::QueryProperties(CStdPtrArray<TypeProperty> &aryProperties)
234 LinearHillMuscle::QueryProperties(aryProperties);
236 aryProperties.Add(
new TypeProperty(
"Ia", AnimatPropertyType::Boolean, AnimatPropertyDirection::Get));
237 aryProperties.Add(
new TypeProperty(
"II", AnimatPropertyType::Boolean, AnimatPropertyDirection::Get));
239 aryProperties.Add(
new TypeProperty(
"ApplyTension", AnimatPropertyType::Boolean, AnimatPropertyDirection::Set));
240 aryProperties.Add(
new TypeProperty(
"IaDischarge", AnimatPropertyType::Float, AnimatPropertyDirection::Set));
241 aryProperties.Add(
new TypeProperty(
"IIDischarge", AnimatPropertyType::Float, AnimatPropertyDirection::Set));
244 void LinearHillStretchReceptor::Load(
CStdXml &oXml)
246 LinearHillMuscle::Load(oXml);
virtual void ResetSimulation()
Resets the simulation back to time 0.
Declares the external stimulus base class.
virtual void CalculateTension()
Calculates the tension.
Base class file for all Animat simulation objects.
Declares the simulation recorder class.
float m_fltIIDischargeConstant
Constant that relates length of muscle segment to discharge rate of type II fibers.
virtual void ResetSimulation()
Resets the simulation back to time 0.
Root namespace for the base simulation library for AnimatLab.
Declares the sigmoid gain class.
virtual bool ApplyTension()
Gets wheter tension is applied by the receptor or not.
Declares the body part class.
virtual ~LinearHillStretchReceptor()
Destructor.
virtual float IIRate()
Gets the ii rate.
virtual float IaDischargeConstant()
Gets the ia discharge constant.
virtual bool IntoElem()
Goes into the next element where the cursor is located.
LinearHillStretchReceptor()
Default constructor.
float m_fltIaRate
Ia fiber discharge rate.
Class that stores information about types for QueryProperty information.
bool m_bApplyTension
Determines whether the receptor applies tension or not.
Declares the key frame class.
bool Std_InValidRange(int iMinVal, int iMaxVal, int iVal, bool bThrowError, std::string strParamName)
Tests whether a number is within a valid range.
Declares the muscle base class.
Declares the joint class.
Declares the organism class.
virtual float IaRate()
Gets the ia rate.
float m_fltSeLength
The length of the SE section of the muscle. The resting length is one half the total muscle length...
Declares the activated item class.
Declares a light manager object.
Declares the bounding box class.
Declares the gain base class.
A standard xml manipulation class.
Declares the linear hill muscle class.
Declares the line base class.
bool Std_ToBool(int iVal)
Converts a value toa bool.
virtual bool GetChildBool(std::string strElementName)
Gets a bool value from the element with the specified name.
Declares an inverted quadratic gain class used to calculate length-tension relationship for muscle...
virtual bool OutOfElem()
Goes out of the element where the cursor is located.
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.
virtual float IIDischargeConstant()
Gets the ii discharge constant.
float m_fltIbRate
Ib fiber discharge rate.
Declares the simulator class.
Declares the activated item manager class.
Declares the external stimuli manager class.
Declares the attachment class.
Declares the receptive field class.
virtual float GetChildFloat(std::string strElementName)
Gets a float value from the element with the specified name.
float m_fltIaDischargeConstant
Constant that relates length of muscle segment to discharge rate of type Ia fibers.
float m_fltIIRate
II fiber discharge rate.
float m_fltPeLength
The length of the PE section of the muscle. The resting length is one half the total muscle length...
virtual void CalculateTension()
Calculates the tension.