8 #include "IMotorizedJoint.h"
9 #include "IMovableItemCallback.h"
10 #include "ISimGUICallback.h"
14 #include "IPhysicsMovableItem.h"
15 #include "IPhysicsBody.h"
17 #include "MovableItem.h"
20 #include "MotorizedJoint.h"
90 {
Std_TraceMsg(0,
"Caught Error in desctructor of Hinge\r\n",
"", -1,
false,
true);}
164 if(fltPos<m_lpLowerLimit->LimitPos())
179 bool Hinge::SetData(
const std::string &strDataType,
const std::string &strValue,
bool bThrowError)
183 if(MotorizedJoint::SetData(strType, strValue,
false))
188 THROW_PARAM_ERROR(Al_Err_lInvalidDataType, Al_Err_strInvalidDataType,
"Data Type", strDataType);
197 if(strType ==
"DESIREDPOSITION")
198 return DESIRED_POSITION_TYPE;
200 return DESIRED_VELOCITY_TYPE;
206 if(iTargetDataType == DESIRED_POSITION_TYPE)
226 void Hinge::Load(
CStdXml &oXml)
228 MotorizedJoint::Load(oXml);
float CylinderHeight()
Gets the height of the cylinder used to display the hinge in the environment.
Base class file for all Animat simulation objects.
virtual float GetLimitRange()
Gets the entire range of movement within the limits. If limits are not enabled then it returns -1...
Declares the simulation recorder class.
virtual void ResetSimulation()
Resets the simulation back to time 0.
Root namespace for the base simulation library for AnimatLab.
Declares the hinge class.
virtual float LimitPos()
Gets the limit position.
float m_fltDesiredPosition
virtual void UpdateData()
Called to collect any body data for this part.
Declares the body part class.
Simulator * m_lpSim
The pointer to a Simulation.
virtual bool IntoElem()
Goes into the next element where the cursor is located.
ConstraintLimit * m_lpUpperLimit
Upper limit constring pointer.
virtual int GetTargetDataTypeIndex(const std::string &strDataType)
Used to convert a string target data type into an integer index.
Declares the key frame class.
Declares the joint class.
Declares the organism class.
AnimatSim::Environment::Structure * m_lpStructure
The pointer to this items parent Structure. If this is not relevant for this object then this is NULL...
virtual bool Enabled()
Tells whether this node is enabled.
Declares the activated item class.
float m_fltRotationDeg
The rotation of the hinge in degrees.
Declares a light manager object.
float CylinderRadius()
Gets the radius cylinder of the cylinder used to display the hinge in the environment.
virtual float GetPositionWithinLimits(float fltPos)
Gets a position value within the constraint limits.
Declares the bounding box class.
float m_fltDesiredPositionDeg
The desired rotation of the hinge in degrees.
virtual void AddExternalNodeInput(int iTargetDataType, float fltInput)
Adds an external node input.
A standard xml manipulation class.
virtual bool EnableMotor()
Tells if the motor is enabled.
float m_fltDesiredVelocity
bool m_bEnableLimits
If true then any ConstraintLimits for this joint are enabled.
ConstraintLimit * m_lpLowerLimit
Lower limit constring pointer.
Hinge()
Default constructor.
void Std_TraceMsg(const int iLevel, std::string strMessage, std::string strSourceFile, int iSourceLine, bool bLogToFile, bool bPrintHeader)
Traces a message to the debugger window.
bool m_bEnabled
Tells if this item is enabled or not. If it is not enabled then it is not run.
float m_fltSize
Scales the size of the graphics for this joint.
virtual ConstraintLimit * UpperLimit()
Gets a pointer to the upper limit ConstraintLimit.
ConstraintLimit * m_lpPosFlap
Pointer to a constraint that is used to represent the position flap.
virtual bool OutOfElem()
Goes out of the element where the cursor is located.
virtual float JointPosition()
Gets the joint position.
Declares the data chart manager class.
virtual ~Hinge()
Destructor.
virtual void ResetSimulation()
Resets the simulation back to time 0.
Declares the rigid body class.
std::string Std_CheckString(std::string strVal)
Converts a string to upper case and trims it.
Declares the constraint limit class.
virtual ConstraintLimit * LowerLimit()
Gets a pointer to the lower limit ConstraintLimit.
Declares the structure class.
Declares the odor type class.
float FlapWidth()
Gets the width of the flaps used to display the hinge in the environment.
Declares the simulator class.
virtual void UpdateData()
Called to collect any body data for this part.
Declares the activated item manager class.
Declares the external stimuli manager class.
Declares the receptive field class.