AnimatLab  2
Test
BlConstraintRelaxation.h
1 // BlConstraintRelaxation.h: interface for the BlConstraintRelaxation class.
2 //
4 #pragma once
5 
7 
8 namespace BulletAnimatSim
9 {
10  namespace Environment
11  {
12 
14  {
15  protected:
16  btAnimatGeneric6DofConstraint *m_lpConstraint;
17 
18  //Pointer to the bullet joint
19  BlJoint *m_lpBlJoint;
20 
23 
26 
28  float m_fltEqPos;
29 
30  //Keeps the inverse damping constant to actually use.
31  float m_fltInvDamping;
32 
33  //For joints like hinge and prismatic I am allowing them to set a spring in the direction of the joint motion (Z axis). However, the joint
34  //itself needs to be the one to determine when to enable/disable the spring because it has to control the motor as well. This flag tells
35  // the relaxation that it should not directly set the spring enabled/disabled, that it should allow the joint to do that itself.
36  bool m_bDisallowSpringEnable;
37 
38  virtual void SetRelaxationProperties();
39 
40  public:
42  virtual ~BlConstraintRelaxation();
43 
44  virtual float MinLimit();
45  virtual void MinLimit(float fltVal, bool bUseScaling = true);
46 
47  virtual float MaxLimit();
48  virtual void MaxLimit(float fltVal, bool bUseScaling = true);
49 
50  virtual float EqPos();
51  virtual void EqPos(float fltVal, bool bUseScaling = true);
52 
53  virtual void Damping(float fltVal, bool bUseScaling = true);
54 
55  virtual bool DisallowSpringEnable();
56  virtual void DisallowSpringEnable(bool bVal);
57 
58  virtual void Initialize();
59 
60  virtual void CreateDefaultUnits();
61  virtual bool SetData(const std::string &strDataType, const std::string &strValue, bool bThrowError = true);
62  virtual void QueryProperties(CStdPtrArray<TypeProperty> &aryProperties);
63 
64  virtual void Load(CStdXml &oXml);
65  };
66 
67  } // Visualization
68 } //BulletAnimatSim
Declares the btGeneric6DofConstraint class.
A common class for all joint data specific to vortex.
Definition: BlJoint.h:29
Classes for implementing the cm-labs vortex physics engine for AnimatLab.
float m_fltMinLimit
The minimum amount that this relaxation is allowed to move.
float m_fltMaxLimit
The maximum amount that this relaxation is allowed to move.
float m_fltEqPos
The equilibrium position of the spring that controls this relaxation.