00001
00002
00003
00004
00005 #ifndef __rdGeneralizedForceAtv_h__
00006 #define __rdGeneralizedForceAtv_h__
00007
00008
00009
00010
00011
00012 #include <rdMath.h>
00013 #include <rdTools.h>
00014 #include <rdStorage.h>
00015 #include <rdModel.h>
00016 #include <rdGeneralizedForce.h>
00017 #include "rdActuators.h"
00018
00019
00020
00021
00036 class RDACTUATORS_API rdGeneralizedForceAtv : public rdGeneralizedForce
00037 {
00038
00039
00040
00041 private:
00042 static const char PROP_OPTIMAL_FORCE[];
00043 static const char PROP_RISE_TIME[];
00044 static const char PROP_FALL_TIME[];
00045 protected:
00047 double _x;
00049 double _a;
00051 double _optimalForce;
00053 double _riseTime;
00055 double _fallTime;
00056
00057
00058
00059
00060 public:
00061 rdGeneralizedForceAtv(int aQID=-1,int aNX=1,int aNY=1,int aNYP=0);
00062 rdGeneralizedForceAtv(IDOM_Element *aElement,
00063 int aNX=1,int aNY=1,int aNYP=0);
00064 rdGeneralizedForceAtv(const rdGeneralizedForceAtv &aActuator);
00065 virtual ~rdGeneralizedForceAtv();
00066 virtual rdActuator* copy() const;
00067 virtual rdActuator* copy(IDOM_Element *aElement) const;
00068 private:
00069 void setNull();
00070 void copyData(const rdGeneralizedForceAtv &aActuator);
00071
00072 public:
00073
00074
00075
00076
00077 rdGeneralizedForceAtv&
00078 operator=(const rdGeneralizedForceAtv &aActuator);
00079
00080
00081
00082
00083 virtual void setControls(const double aX[]);
00084 virtual void getControls(double rX[]) const;
00085 virtual void setStates(const double aY[]);
00086 virtual void getStates(double rY[]) const;
00087 void setOptimalForce(double aOptimalForce);
00088 double getOptimalForce() const;
00089 void setRiseTime(double aRiseTime);
00090 double getRiseTime() const;
00091 void setFallTime(double aFallTime);
00092 double getFallTime() const;
00093
00094
00095
00096
00097
00098
00099
00100
00101 virtual void promoteControlsToStates(const double aX[],double aDT);
00102 virtual void computeActuation();
00103 virtual void computeStateDerivatives(double rDYDT[]);
00104
00105
00106
00107
00108 virtual void updateObject(bool aDeep=true);
00109 virtual void updateNode(bool aDeep=true);
00110 virtual void generateNode(IDOM_Element *aParent);
00111 void updateData();
00112
00113
00114 };
00115
00116
00117
00118
00119 #endif // #ifndef __rdGeneralizedForceAtv_h__