jntarrayacc.hpp

Go to the documentation of this file.
00001 // Copyright  (C)  2007  Ruben Smits <ruben dot smits at mech dot kuleuven dot be>
00002 
00003 // Version: 1.0
00004 // Author: Ruben Smits <ruben dot smits at mech dot kuleuven dot be>
00005 // Maintainer: Ruben Smits <ruben dot smits at mech dot kuleuven dot be>
00006 // URL: http://www.orocos.org/kdl
00007 
00008 // This library is free software; you can redistribute it and/or
00009 // modify it under the terms of the GNU Lesser General Public
00010 // License as published by the Free Software Foundation; either
00011 // version 2.1 of the License, or (at your option) any later version.
00012 
00013 // This library is distributed in the hope that it will be useful,
00014 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00015 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00016 // Lesser General Public License for more details.
00017 
00018 // You should have received a copy of the GNU Lesser General Public
00019 // License along with this library; if not, write to the Free Software
00020 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00021 
00022 #ifndef KDL_JNTARRAYACC_HPP
00023 #define KDL_JNTARRAYACC_HPP
00024 
00025 #include "utilities/utility.h"
00026 #include "jntarray.hpp"
00027 #include "jntarrayvel.hpp"
00028 #include "frameacc.hpp"
00029 
00030 namespace KDL
00031 {
00032     class JntArrayAcc
00033     {
00034     public:
00035         JntArray q;
00036         JntArray qdot;
00037         JntArray qdotdot;
00038     public:
00039       JntArrayAcc(){};
00040         JntArrayAcc(unsigned int size);
00041         JntArrayAcc(const JntArray& q,const JntArray& qdot,const JntArray& qdotdot);
00042         JntArrayAcc(const JntArray& q,const JntArray& qdot);
00043         JntArrayAcc(const JntArray& q);
00044 
00045         void resize(unsigned int newSize);
00046 
00047         JntArray value()const;
00048         JntArray deriv()const;
00049         JntArray dderiv()const;
00050 
00051         friend void Add(const JntArrayAcc& src1,const JntArrayAcc& src2,JntArrayAcc& dest);
00052         friend void Add(const JntArrayAcc& src1,const JntArrayVel& src2,JntArrayAcc& dest);
00053         friend void Add(const JntArrayAcc& src1,const JntArray& src2,JntArrayAcc& dest);
00054         friend void Subtract(const JntArrayAcc& src1,const JntArrayAcc& src2,JntArrayAcc& dest);
00055         friend void Subtract(const JntArrayAcc& src1,const JntArrayVel& src2,JntArrayAcc& dest);
00056         friend void Subtract(const JntArrayAcc& src1,const JntArray& src2,JntArrayAcc& dest);
00057         friend void Multiply(const JntArrayAcc& src,const double& factor,JntArrayAcc& dest);
00058         friend void Multiply(const JntArrayAcc& src,const doubleVel& factor,JntArrayAcc& dest);
00059         friend void Multiply(const JntArrayAcc& src,const doubleAcc& factor,JntArrayAcc& dest);
00060         friend void Divide(const JntArrayAcc& src,const double& factor,JntArrayAcc& dest);
00061         friend void Divide(const JntArrayAcc& src,const doubleVel& factor,JntArrayAcc& dest);
00062         friend void Divide(const JntArrayAcc& src,const doubleAcc& factor,JntArrayAcc& dest);
00063         friend void SetToZero(JntArrayAcc& array);
00064         friend bool Equal(const JntArrayAcc& src1,const JntArrayAcc& src2,double eps=epsilon);
00065 
00066     };
00067 }
00068 
00069 #endif

Generated on Wed Nov 23 19:00:20 2011 for FreeCAD by  doxygen 1.6.1