8 #include "IMovableItemCallback.h"
9 #include "ISimGUICallback.h"
13 #include "IPhysicsMovableItem.h"
14 #include "IPhysicsBody.h"
16 #include "MovableItem.h"
217 bool Box::SetData(
const std::string &strDataType,
const std::string &strValue,
bool bThrowError)
221 if(RigidBody::SetData(strType, strValue,
false))
224 if(strType ==
"LENGTH")
226 Length((
float) atof(strValue.c_str()));
230 if(strType ==
"WIDTH")
232 Width((
float) atof(strValue.c_str()));
236 if(strType ==
"HEIGHT")
238 Height((
float) atof(strValue.c_str()));
242 if(strType ==
"LENGTHSECTIONS")
248 if(strType ==
"WIDTHSECTIONS")
254 if(strType ==
"HEIGHTSECTIONS")
262 THROW_PARAM_ERROR(Al_Err_lInvalidDataType, Al_Err_strInvalidDataType,
"Data Type", strDataType);
267 void Box::QueryProperties(CStdPtrArray<TypeProperty> &aryProperties)
269 RigidBody::QueryProperties(aryProperties);
271 aryProperties.Add(
new TypeProperty(
"Length", AnimatPropertyType::Float, AnimatPropertyDirection::Set));
272 aryProperties.Add(
new TypeProperty(
"Width", AnimatPropertyType::Float, AnimatPropertyDirection::Set));
273 aryProperties.Add(
new TypeProperty(
"Height", AnimatPropertyType::Float, AnimatPropertyDirection::Set));
274 aryProperties.Add(
new TypeProperty(
"LengthSections", AnimatPropertyType::Integer, AnimatPropertyDirection::Set));
275 aryProperties.Add(
new TypeProperty(
"WidthSections", AnimatPropertyType::Integer, AnimatPropertyDirection::Set));
276 aryProperties.Add(
new TypeProperty(
"HeightSections", AnimatPropertyType::Integer, AnimatPropertyDirection::Set));
281 RigidBody::Load(oXml);
Base class file for all Animat simulation objects.
Declares the simulation recorder class.
virtual float WidthSegmentSize()
Gets the width segment size.
Root namespace for the base simulation library for AnimatLab.
int m_iHeightSections
The number of sections to split the box height into.
Declares the body part class.
int m_iWidthSections
The number of sections to split the box width into.
Simulator * m_lpSim
The pointer to a Simulation.
virtual bool IntoElem()
Goes into the next element where the cursor is located.
virtual int HeightSections()
Gets the height sections.
Class that stores information about types for QueryProperty information.
Declares the key frame class.
virtual float Width()
Gets the width of the box.
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_fltLength
The length dimension of the box.
virtual void Resize()
Called when this object has been resized.
Declares the activated item class.
Declares a light manager object.
Declares the bounding box class.
A standard xml manipulation class.
virtual float Length()
Gets the length of the box.
virtual float LengthSegmentSize()
Gets the length segment size.
virtual int LengthSections()
Gets the length sections.
float m_fltWidth
The width dimension of the box.
int m_iLengthSections
The number of sections to split the box length into.
float m_fltHeight
The height dimension of the box.
Box()
Default constructor.
virtual bool OutOfElem()
Goes out of the element where the cursor is located.
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 float HeightSegmentSize()
Gets the height segment size.
Declares the structure class.
virtual float Height()
Gets the height of the box.
Declares the odor type class.
virtual float InverseDistanceUnits()
Gets the inverse distance units.
Declares the simulator class.
virtual ~Box()
Destructor.
Declares the activated item manager class.
Declares the external stimuli manager class.
virtual int WidthSections()
Gets the width sections.
Declares the receptive field class.
virtual float GetChildFloat(std::string strElementName)
Gets a float value from the element with the specified name.