AnimatLab  2
Test
ConstraintLimit.h
Go to the documentation of this file.
1 
7 #pragma once
8 
9 namespace AnimatSim
10 {
11  namespace Environment
12  {
22  class ANIMAT_PORT ConstraintLimit : public AnimatBase
23  {
24  protected:
27 
30 
32  float m_fltDamping;
33 
36 
39 
42 
44  CStdColor m_vColor;
45 
49 
51  virtual void SetLimitValues() = 0;
52 
53  public:
55  virtual ~ConstraintLimit();
56 
57  static ConstraintLimit *CastToDerived(AnimatBase *lpBase) {return static_cast<ConstraintLimit*>(lpBase);}
58 
67  virtual float LimitPos();
68 
79  virtual void LimitPos(float fltVal, bool bUseScaling = true, bool bOverrideSameCheck = false);
80 
87  virtual void SetLimitPos() = 0;
88 
97  virtual float Damping();
98 
108  virtual void Damping(float fltVal, bool bUseScaling = true);
109 
118  virtual float Restitution();
119 
128  virtual void Restitution(float fltVal);
129 
138  virtual float Stiffness();
139 
149  virtual void Stiffness(float fltVal, bool bUseScaling = true);
150 
151  virtual void Color(float fltR, float fltG, float fltB, float fltA);
152  virtual CStdColor *Color();
153  virtual void Color(std::string strXml);
154 
163  virtual void Alpha(float fltA) = 0;
164 
173  virtual float Alpha();
174 
175  virtual void IsLowerLimit(bool bVal);
176  virtual bool IsLowerLimit();
177 
178  virtual void IsShowPosition(bool bVal);
179  virtual bool IsShowPosition();
180 
181  virtual void SetSystemPointers(Simulator *lpSim, Structure *lpStructure, NeuralModule *lpModule, Node *lpNode, float fltPosition, bool bVerify);
182  virtual void SetSystemPointers(Simulator *lpSim, Structure *lpStructure, NeuralModule *lpModule, Node *lpNode, bool bVerify);
183  virtual void VerifySystemPointers();
184  virtual float *GetDataPointer(const std::string &strDataType);
185  virtual bool SetData(const std::string &strDataType, const std::string &strValue, bool bThrowError = true);
186  virtual void QueryProperties(CStdPtrArray<TypeProperty> &aryProperties);
187  virtual void Load(CStdXml &oXml, std::string strName);
188 
195  virtual void SetupGraphics() = 0;
196 
203  virtual void DeleteGraphics() = 0;
204  };
205 
206  } // Environment
207 } //AnimatSim
The base class for all of the joint type of objects.
Definition: Joint.h:40
float m_fltLimitPos
The limit position for the constraint. This can be in radians or meters depending on the type of join...
Simulates the entire environment.
Definition: Simulator.h:31
Root namespace for the base simulation library for AnimatLab.
float m_fltRestitution
The restitution coefficient for the constraint.
Joint * m_lpJoint
Pointer to parent joint.
float m_fltDamping
The damping for the constraint.
A "static" structure in the simulation.
Definition: Structure.h:84
Animat base class.
Definition: AnimatBase.h:36
float m_fltStiffness
The stiffness of the constraint.
Base class for body parts and neural network nodes.
Definition: Node.h:25
bool m_bIsLowerLimit
If true then this is the lower limit of a pair of ConstraintLimits, else it is the upper limit...
CStdColor m_vColor
The color used to display the limit.