8 #include "IMovableItemCallback.h"
9 #include "ISimGUICallback.h"
13 #include "IPhysicsMovableItem.h"
14 #include "IPhysicsBody.h"
16 #include "MovableItem.h"
66 void LinearJoint::LinearType(std::string strType)
70 if(strTP ==
"LINEAR1D")
72 else if(strTP ==
"LINEAR2D")
74 else if(strTP ==
"LINEAR3D")
77 THROW_PARAM_ERROR(Al_Err_lInvalidLinearType, Al_Err_strInvalidLinearType,
"Type", strType);
80 void LinearJoint::LinearType(
int iType)
83 m_iLinearType = iType;
86 int LinearJoint::LinearType() {
return m_iLinearType;}
88 float LinearJoint::PlaneWidth() {
return m_fltSize/100.0f;}
90 float LinearJoint::PlaneSize() {
return m_fltSize;}
92 float LinearJoint::CylinderRadius() {
return m_fltSize*0.1f;}
94 float LinearJoint::CylinderHeight() {
return m_fltSize;}
96 #pragma region DataAccesMethods
98 bool LinearJoint::SetData(
const std::string &strDataType,
const std::string &strValue,
bool bThrowError)
102 if(Joint::SetData(strType, strValue,
false))
105 if(strType ==
"LINEARTYPE")
107 LinearType(strValue);
113 THROW_PARAM_ERROR(Al_Err_lInvalidDataType, Al_Err_strInvalidDataType,
"Data Type", strDataType);
118 void LinearJoint::QueryProperties(CStdPtrArray<TypeProperty> &aryProperties)
120 Joint::QueryProperties(aryProperties);
122 aryProperties.Add(
new TypeProperty(
"LinearType", AnimatPropertyType::String, AnimatPropertyDirection::Set));
127 void LinearJoint::Load(
CStdXml &oXml)
Base class file for all Animat simulation objects.
Declares the simulation recorder class.
Root namespace for the base simulation library for AnimatLab.
Declares the body part class.
virtual bool IntoElem()
Goes into the next element where the cursor is located.
Declares the linear 1-D, 2-D, and 3-D class.
Class that stores information about types for QueryProperty information.
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 joint class.
Declares the organism class.
std::string Std_Trim(std::string strVal)
Trims a string.
Declares the activated item class.
LinearJoint()
Default constructor.
Declares a light manager object.
Declares the bounding box class.
A standard xml manipulation class.
virtual std::string GetChildString(std::string strElementName)
Gets a string value from the element with the specified name.
float m_fltSize
Scales the size of the graphics for this joint.
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 ~LinearJoint()
Destructor.
Declares the simulator class.
std::string Std_ToUpper(std::string strVal)
Converts a string to upper case.
Declares the activated item manager class.
Declares the external stimuli manager class.
Declares the receptive field class.