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

rdCMC_Joint.h

00001 // rdCMC_Joint.h 00002 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 00003 // Copyright (c) 2006 Stanford University and Realistic Dynamics, Inc. 00004 // Contributors: Frank C. Anderson, Ph.D. 00005 // 00006 // Permission is hereby granted, free of charge, to any person obtaining 00007 // a copy of this software and associated documentation files (the 00008 // "Software"), to deal in the Software without restriction, including 00009 // without limitation the rights to use, copy, modify, merge, publish, 00010 // distribute, sublicense, and/or sell copies of the Software, and to 00011 // permit persons to whom the Software is furnished to do so, subject 00012 // to the following conditions: 00013 // 00014 // The above copyright notice and this permission notice shall be included 00015 // in all copies or substantial portions of the Software. 00016 // 00017 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 00018 // EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 00019 // WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR 00020 // PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS, 00021 // CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 00022 // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 00023 // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH 00024 // THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 00025 // 00026 // This software, originally developed by Realistic Dynamics, Inc., was 00027 // transferred to Stanford University on November 1, 2006. 00028 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 00029 #ifndef __rdCMCJoint_h__ 00030 #define __rdCMCJoint_h__ 00031 00032 00033 //============================================================================ 00034 // INCLUDE 00035 //============================================================================ 00036 #include "rdCMCDLL.h" 00037 #include <OpenSim/Simulation/Model/Model.h> 00038 #include "rdCMC_Task.h" 00039 00040 00041 //============================================================================= 00042 //============================================================================= 00049 class RDCMC_API rdCMC_Joint : public rdCMC_Task 00050 { 00051 00052 //============================================================================= 00053 // DATA 00054 //============================================================================= 00055 protected: 00057 OpenSim::PropertyInt _propQID; 00059 OpenSim::PropertyDbl _propLimit; 00060 00061 // REFERENCES 00062 int &_qid; 00063 double &_limit; 00064 00065 //============================================================================= 00066 // METHODS 00067 //============================================================================= 00068 //-------------------------------------------------------------------------- 00069 // CONSTRUCTION 00070 //-------------------------------------------------------------------------- 00071 public: 00072 rdCMC_Joint(int aQID=-1); 00073 rdCMC_Joint(DOMElement *aElement); 00074 rdCMC_Joint(const rdCMC_Joint &aTask); 00075 virtual ~rdCMC_Joint(); 00076 virtual OpenSim::Object* copy() const; 00077 virtual OpenSim::Object* copy(DOMElement *aElement) const; 00078 private: 00079 void setNull(); 00080 void setupProperties(); 00081 void copyData(const rdCMC_Joint &aTask); 00082 00083 //-------------------------------------------------------------------------- 00084 // OPERATORS 00085 //-------------------------------------------------------------------------- 00086 public: 00087 #ifndef SWIG 00088 rdCMC_Joint& operator=(const rdCMC_Joint &aTask); 00089 #endif 00090 //-------------------------------------------------------------------------- 00091 // GET AND SET 00092 //-------------------------------------------------------------------------- 00093 virtual void setParametersBasedOnName(); 00094 void setQID(int aQID); 00095 int getQID() const; 00096 double getLimit() const; 00097 00098 //-------------------------------------------------------------------------- 00099 // COMPUTATIONS 00100 //-------------------------------------------------------------------------- 00101 virtual void computeErrors(double aT); 00102 virtual void computeDesiredAccelerations(double aT); 00103 virtual void computeDesiredAccelerations(double aTI,double aTF); 00104 virtual void computeAccelerations(); 00105 00106 //-------------------------------------------------------------------------- 00107 // XML 00108 //-------------------------------------------------------------------------- 00109 virtual void updateFromXMLNode(); 00110 00111 00112 //============================================================================= 00113 }; // END of class rdCMC_Joint 00114 //============================================================================= 00115 //============================================================================= 00116 00117 #endif // __rdCMCJoint_h__ 00118 00119

Generated on Wed Nov 1 16:04:31 2006 for Computed Muscle Control (CMC) API by doxygen 1.3.8