8 #include "IMovableItemCallback.h"
9 #include "ISimGUICallback.h"
13 #include "IPhysicsMovableItem.h"
14 #include "IPhysicsBody.h"
16 #include "MovableItem.h"
147 bool Torus::SetData(
const std::string &strDataType,
const std::string &strValue,
bool bThrowError)
151 if(RigidBody::SetData(strType, strValue,
false))
154 if(strType ==
"OUTSIDERADIUS")
160 if(strType ==
"INSIDERADIUS")
166 if(strType ==
"SIDES")
168 Sides(atoi(strValue.c_str()));
172 if(strType ==
"RINGS")
174 Rings(atoi(strValue.c_str()));
180 THROW_PARAM_ERROR(Al_Err_lInvalidDataType, Al_Err_strInvalidDataType,
"Data Type", strDataType);
185 void Torus::QueryProperties(CStdPtrArray<TypeProperty> &aryProperties)
187 RigidBody::QueryProperties(aryProperties);
189 aryProperties.Add(
new TypeProperty(
"OutsideRadius", AnimatPropertyType::Float, AnimatPropertyDirection::Set));
190 aryProperties.Add(
new TypeProperty(
"InsideRadius", AnimatPropertyType::Float, AnimatPropertyDirection::Set));
191 aryProperties.Add(
new TypeProperty(
"Sides", AnimatPropertyType::Integer, AnimatPropertyDirection::Set));
192 aryProperties.Add(
new TypeProperty(
"Rings", AnimatPropertyType::Integer, AnimatPropertyDirection::Set));
195 void Torus::Load(
CStdXml &oXml)
197 RigidBody::Load(oXml);
Base class file for all Animat simulation objects.
virtual float InsideRadius()
Gets the inside radius.
Declares the simulation recorder class.
Root namespace for the base simulation library for AnimatLab.
Declares the Torus class.
Declares the body part class.
virtual int Rings()
Gets the number of rings used to draw the Torus.
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.
float m_fltInsideRadius
The inside radius of the torus.
int m_iRings
The number of rings used to draw the torus.
Declares the key frame class.
virtual int Sides()
Gets the number of sides used to draw the Torus.
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 void Resize()
Called when this object has been resized.
Declares the activated item class.
virtual ~Torus()
Destructor.
Declares a light manager object.
Torus()
Default constructor.
Declares the bounding box class.
A standard xml manipulation class.
virtual bool OutOfElem()
Goes out of the element where the cursor is located.
float m_fltOutsideRadius
The outside radius of the torus.
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.
int m_iSides
The number of sides used to draw the torus.
Declares the structure class.
Declares the odor type class.
virtual float OutsideRadius()
Gets the outside radius.
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.