8 #include "IMovableItemCallback.h"
9 #include "ISimGUICallback.h"
13 #include "IPhysicsMovableItem.h"
14 #include "IPhysicsBody.h"
16 #include "MovableItem.h"
73 THROW_PARAM_ERROR(Al_Err_lInvalidConeRadius, Al_Err_strInvalidConeRadius,
"Body",
m_strName);
89 THROW_PARAM_ERROR(Al_Err_lInvalidConeRadius, Al_Err_strInvalidConeRadius,
"Body",
m_strName);
139 bool Cone::SetData(
const std::string &strDataType,
const std::string &strValue,
bool bThrowError)
143 if(RigidBody::SetData(strType, strValue,
false))
146 if(strType ==
"LOWERRADIUS")
152 if(strType ==
"UPPERRADIUS")
158 if(strType ==
"HEIGHT")
160 Height((
float) atof(strValue.c_str()));
164 if(strType ==
"SIDES")
166 Sides(atoi(strValue.c_str()));
172 THROW_PARAM_ERROR(Al_Err_lInvalidDataType, Al_Err_strInvalidDataType,
"Data Type", strDataType);
177 void Cone::QueryProperties(CStdPtrArray<TypeProperty> &aryProperties)
179 RigidBody::QueryProperties(aryProperties);
181 aryProperties.Add(
new TypeProperty(
"LowerRadius", AnimatPropertyType::Float, AnimatPropertyDirection::Set));
182 aryProperties.Add(
new TypeProperty(
"UpperRadius", AnimatPropertyType::Float, AnimatPropertyDirection::Set));
183 aryProperties.Add(
new TypeProperty(
"Height", AnimatPropertyType::Float, AnimatPropertyDirection::Set));
184 aryProperties.Add(
new TypeProperty(
"Sides", AnimatPropertyType::Integer, AnimatPropertyDirection::Set));
189 RigidBody::Load(oXml);
Base class file for all Animat simulation objects.
Declares the simulation recorder class.
float m_fltLowerRadius
The lower radius of the cone.
virtual int Sides()
Gets the number of sides used to draw the cone.
Root namespace for the base simulation library for AnimatLab.
Declares the body part class.
int m_iSides
The number of sides used to draw the cone.
Cone()
Default constructor.
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.
virtual float Height()
Gets the height.
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.
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.
Declares a light manager object.
Declares the bounding box class.
virtual float LowerRadius()
Gets the lower radius.
A standard xml manipulation class.
float m_fltHeight
The height of the cone.
virtual ~Cone()
Destructor.
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.
float m_fltUpperRadius
The upper radius of the cone.
Declares the external stimuli manager class.
virtual float UpperRadius()
Gets the upper radius.
Declares the receptive field class.
std::string m_strName
The name for this object.
virtual float GetChildFloat(std::string strElementName)
Gets a float value from the element with the specified name.