Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   Related Pages  

suSpringGeneralizedForce.h

00001 // suSpringGeneralizedForce.h
00002 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
00003 // AUTHOR: Frank C. Anderson
00004 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
00005 #ifndef __suSpringGeneralizedForce_h__
00006 #define __suSpringGeneralizedForce_h__
00007 
00008 
00009 //=============================================================================
00010 // INCLUDES
00011 //=============================================================================
00012 #include <rdMath.h>
00013 #include <rdTools.h>
00014 #include <rdStorage.h>
00015 #include <rdModel.h>
00016 #include <rdGeneralizedForce.h>
00017 #include "suActuatorsDLL.h"
00018 
00019 
00020 //=============================================================================
00021 //=============================================================================
00030 class SUACTUATORS_API suSpringGeneralizedForce : public rdGeneralizedForce 
00031 {
00032 //=============================================================================
00033 // DATA
00034 //=============================================================================
00035 private:
00036    static const char PROP_REST_LENGTH[];
00037    static const char PROP_VISCOSITY[];
00038 protected:
00040    double _restLength;
00042    double _viscosity;
00044    double _stiffness;
00045 
00046 //=============================================================================
00047 // METHODS
00048 //=============================================================================
00049 public:
00050    suSpringGeneralizedForce(int aQID=-1,int aNX=1,int aNY=0,int aNYP=0);
00051    suSpringGeneralizedForce(IDOM_Element *aElement,
00052       int aNX=1,int aNY=0,int aNYP=0);
00053    suSpringGeneralizedForce(const suSpringGeneralizedForce &aActuator);
00054    virtual ~suSpringGeneralizedForce();
00055    virtual rdActuator* copy() const;
00056    virtual rdActuator* copy(IDOM_Element *aElement) const;
00057 private:
00058    void setNull();
00059 
00060 public:
00061 
00062    //--------------------------------------------------------------------------
00063    // OPERATORS
00064    //--------------------------------------------------------------------------
00065    suSpringGeneralizedForce&
00066       operator=(const suSpringGeneralizedForce &aActuator);
00067 
00068    //--------------------------------------------------------------------------
00069    // GET AND SET
00070    //--------------------------------------------------------------------------
00071    virtual void setControls(const double aX[]);
00072    virtual void getControls(double rX[]) const;
00073    void setRestLength(double aRestLength);
00074    double getRestLength() const;
00075    void setViscosity(double aViscosity);
00076    double getViscosity() const;
00077    void setStiffness(double aStiffness);
00078    double getStiffness() const;
00079 
00080    //--------------------------------------------------------------------------
00081    // APPLICATION
00082    //--------------------------------------------------------------------------
00083 
00084    //--------------------------------------------------------------------------
00085    // COMPUTATIONS
00086    //--------------------------------------------------------------------------
00087    virtual void computeActuation();
00088 
00089    //--------------------------------------------------------------------------
00090    // XML
00091    //--------------------------------------------------------------------------
00092    virtual void updateObject(bool aDeep=true);
00093    virtual void updateNode(bool aDeep=true);
00094    virtual void generateNode(IDOM_Element *aParent);
00095    void updateData();
00096 
00097 //=============================================================================
00098 }; // END of class suSpringGeneralizedForce
00099 //=============================================================================
00100 //=============================================================================
00101 
00102 
00103 #endif // #ifndef __suSpringGeneralizedForce_h__

Generated on Wed Aug 20 02:17:07 2003 for Simulation Software by doxygen1.3