AnimatLab  2
Test
ConstraintFriction.h
Go to the documentation of this file.
1 
7 #pragma once
8 
9 namespace AnimatSim
10 {
11 
12  namespace Environment
13  {
20  class ANIMAT_PORT ConstraintFriction : public AnimatBase
21  {
22  protected:
25 
28 
30  float m_fltLoss;
31 
34 
37 
38  virtual void SetFrictionProperties() = 0;
39 
40  public:
42  virtual ~ConstraintFriction();
43 
44  static ConstraintFriction *CastToDerived(AnimatBase *lpBase) {return static_cast<ConstraintFriction*>(lpBase);}
45 
46  virtual bool Enabled();
47  virtual void Enabled(bool bVal);
48 
49  virtual float Coefficient();
50  virtual void Coefficient(float fltVal);
51 
52  virtual float MaxForce();
53  virtual void MaxForce(float fltVal, bool bUseScaling = true);
54 
55  virtual float Loss();
56  virtual void Loss(float fltVal, bool bUseScaling = true);
57 
58  virtual bool Proportional();
59  virtual void Proportional(bool bVal);
60 
61  virtual float StaticFrictionScale();
62  virtual void StaticFrictionScale(float fltVal);
63 
64  virtual void CreateDefaultUnits();
65  virtual bool SetData(const std::string &strDataType, const std::string &strValue, bool bThrowError = true);
66  virtual void QueryProperties(CStdPtrArray<TypeProperty> &aryProperties);
67 
68  virtual void Load(CStdXml &oXml);
69  };
70 
71  } // Visualization
72 } //VortexAnimatSim
Root namespace for the base simulation library for AnimatLab.
float m_fltStaticFrictionScale
The scale ration of static to dynamic friction.
float m_fltCoefficient
The friction coefficient for this constraint.
Animat base class.
Definition: AnimatBase.h:36
bool m_bProportional
Tells if the friction force should be scaled based on the force applied to the joint.
float m_fltMaxForce
The maximum force for this constraint.
float m_fltLoss
The velocity loss for this constraint.