8 #include "IMovableItemCallback.h"
9 #include "ISimGUICallback.h"
13 #include "IPhysicsMovableItem.h"
14 #include "IPhysicsBody.h"
16 #include "MovableItem.h"
118 bool Cylinder::SetData(
const std::string &strDataType,
const std::string &strValue,
bool bThrowError)
122 if(RigidBody::SetData(strType, strValue,
false))
125 if(strType ==
"RADIUS")
127 Radius((
float) atof(strValue.c_str()));
131 if(strType ==
"HEIGHT")
133 Height((
float) atof(strValue.c_str()));
137 if(strType ==
"SIDES")
139 Sides(atoi(strValue.c_str()));
145 THROW_PARAM_ERROR(Al_Err_lInvalidDataType, Al_Err_strInvalidDataType,
"Data Type", strDataType);
150 void Cylinder::QueryProperties(CStdPtrArray<TypeProperty> &aryProperties)
152 RigidBody::QueryProperties(aryProperties);
154 aryProperties.Add(
new TypeProperty(
"Radius", AnimatPropertyType::Float, AnimatPropertyDirection::Set));
155 aryProperties.Add(
new TypeProperty(
"Height", AnimatPropertyType::Float, AnimatPropertyDirection::Set));
156 aryProperties.Add(
new TypeProperty(
"Sides", AnimatPropertyType::Integer, AnimatPropertyDirection::Set));
159 void Cylinder::Load(
CStdXml &oXml)
161 RigidBody::Load(oXml);
Base class file for all Animat simulation objects.
Declares the simulation recorder class.
Declares the cylinder class.
Root namespace for the base simulation library for AnimatLab.
Declares the body part class.
float m_fltRadius
The radius of the cylinder.
virtual ~Cylinder()
Destructor.
Cylinder()
Default constructor.
int m_iSides
The number of sides used to draw the cylinder.
Simulator * m_lpSim
The pointer to a Simulation.
virtual bool IntoElem()
Goes into the next element where the cursor is located.
Class that stores information about types for QueryProperty information.
Declares the key frame class.
Declares the organism class.
virtual int GetChildInt(std::string strElementName)
Gets an integer value from the element with the specified name.
float m_fltHeight
The height of the cylinder.
bool Std_IsAboveMin(int iMinVal, int iVal, bool bThrowError, std::string strParamName, bool bInclusiveLimit)
Tests if a number is above a minimum value.
virtual float Height()
Gets the height.
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 int Sides()
Gets the number of sides used to draw the cylinder.
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.
Declares the structure class.
Declares the odor type class.
virtual float InverseDistanceUnits()
Gets the inverse distance units.
Declares the simulator class.
Declares the activated item manager class.
Declares the external stimuli manager class.
Declares the receptive field class.
virtual float GetChildFloat(std::string strElementName)
Gets a float value from the element with the specified name.
virtual float Radius()
Gets the radius.