AnimatLab  2
Test
Hinge.h
Go to the documentation of this file.
1 
7 #pragma once
8 
9 namespace AnimatSim
10 {
11  namespace Environment
12  {
13 
19  namespace Joints
20  {
21 
39  class ANIMAT_PORT Hinge : public AnimatSim::Environment::MotorizedJoint
40  {
41  protected:
44 
47 
50 
53 
56 
57  public:
58  Hinge();
59  virtual ~Hinge();
60 
61  static Hinge *CastToDerived(AnimatBase *lpBase) {return static_cast<Hinge*>(lpBase);}
62 
63  float CylinderRadius();
64  float CylinderHeight();
65  float FlapWidth();
66 
67  virtual void Enabled(bool bValue);
68 
69  virtual ConstraintLimit *UpperLimit() ;
70  virtual ConstraintLimit *LowerLimit();
71 
72  virtual float GetPositionWithinLimits(float fltPos);
73  virtual float GetLimitRange();
74 
75  virtual bool SetData(const std::string &strDataType, const std::string &strValue, bool bThrowError = true);
76  virtual void AddExternalNodeInput(int iTargetDataType, float fltInput);
77  virtual int GetTargetDataTypeIndex(const std::string &strDataType);
78  virtual void UpdateData();
79  virtual void ResetSimulation();
80 
81  virtual void Load(CStdXml &oXml);
82  };
83 
84  } //Joints
85  } // Environment
86 } //AnimatSim
Root namespace for the base simulation library for AnimatLab.
ConstraintLimit * m_lpUpperLimit
Upper limit constring pointer.
Definition: Hinge.h:43
float m_fltRotationDeg
The rotation of the hinge in degrees.
Definition: Hinge.h:52
float m_fltDesiredPositionDeg
The desired rotation of the hinge in degrees.
Definition: Hinge.h:55
ConstraintLimit * m_lpLowerLimit
Lower limit constring pointer.
Definition: Hinge.h:46
Animat base class.
Definition: AnimatBase.h:36
ConstraintLimit * m_lpPosFlap
Pointer to a constraint that is used to represent the position flap.
Definition: Hinge.h:49
A hinge type of joint.
Definition: Hinge.h:39