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"
88 {
Std_TraceMsg(0,
"Caught Error in desctructor of Prismatic\r\n",
"", -1,
false,
true);}
151 if(fltPos<m_lpLowerLimit->LimitPos())
166 bool Prismatic::SetData(
const std::string &strDataType,
const std::string &strValue,
bool bThrowError)
170 if(MotorizedJoint::SetData(strType, strValue,
false))
175 THROW_PARAM_ERROR(Al_Err_lInvalidDataType, Al_Err_strInvalidDataType,
"Data Type", strDataType);
184 if(strType ==
"DESIREDPOSITION")
185 return DESIRED_POSITION_TYPE;
187 return DESIRED_VELOCITY_TYPE;
193 if(iTargetDataType == DESIRED_POSITION_TYPE)
199 void Prismatic::Load(
CStdXml &oXml)
201 MotorizedJoint::Load(oXml);
float BoxSize()
Gets the width of the flaps used to display the hinge in the environment.
virtual int GetTargetDataTypeIndex(const std::string &strDataType)
Used to convert a string target data type into an integer index.
Base class file for all Animat simulation objects.
Declares the simulation recorder class.
Root namespace for the base simulation library for AnimatLab.
virtual float LimitPos()
Gets the limit position.
float m_fltDesiredPosition
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.
Declares the key frame class.
Declares the joint class.
Declares the organism class.
Declares the prismatic class.
virtual ~Prismatic()
Destructor.
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.
virtual float GetPositionWithinLimits(float fltPos)
Gets a position value within the constraint limits.
virtual float GetLimitRange()
Gets the entire range of movement within the limits. If limits are not enabled then it returns -1...
ConstraintLimit * m_lpUpperLimit
Upper limit constring pointer.
Declares the activated item class.
Declares a light manager object.
Declares the bounding box class.
A standard xml manipulation class.
virtual bool EnableMotor()
Tells if the motor is enabled.
virtual void AddExternalNodeInput(int iTargetDataType, float fltInput)
Adds an external node input.
float m_fltDesiredVelocity
bool m_bEnableLimits
If true then any ConstraintLimits for this joint are enabled.
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.
ConstraintLimit * m_lpLowerLimit
Lower limit constring pointer.
bool m_bEnabled
Tells if this item is enabled or not. If it is not enabled then it is not run.
Prismatic()
Default constructor.
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.
ConstraintLimit * m_lpPosFlap
Pointer to a constraint that is used to represent the position flap.
virtual float JointPosition()
Gets the joint position.
Declares the data chart manager class.
float CylinderRadius()
Gets the radius cylinder of the cylinder used to display the axis of the prismatic joint in the envir...
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.
Declares the structure class.
Declares the odor type class.
virtual ConstraintLimit * UpperLimit()
Gets a pointer to the upper limit ConstraintLimit.
Declares the simulator class.
virtual ConstraintLimit * LowerLimit()
Gets a pointer to the lower limit ConstraintLimit.
Declares the activated item manager class.
Declares the external stimuli manager class.
Declares the receptive field class.