KDL  1.3.0
jntarrayvel.hpp
Go to the documentation of this file.
1 // Copyright (C) 2007 Ruben Smits <ruben dot smits at mech dot kuleuven dot be>
2 
3 // Version: 1.0
4 // Author: Ruben Smits <ruben dot smits at mech dot kuleuven dot be>
5 // Maintainer: Ruben Smits <ruben dot smits at mech dot kuleuven dot be>
6 // URL: http://www.orocos.org/kdl
7 
8 // This library is free software; you can redistribute it and/or
9 // modify it under the terms of the GNU Lesser General Public
10 // License as published by the Free Software Foundation; either
11 // version 2.1 of the License, or (at your option) any later version.
12 
13 // This library is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 // Lesser General Public License for more details.
17 
18 // You should have received a copy of the GNU Lesser General Public
19 // License along with this library; if not, write to the Free Software
20 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21 
22 #ifndef KDL_JNTARRAYVEL_HPP
23 #define KDL_JNTARRAYVEL_HPP
24 
25 #include "utilities/utility.h"
26 #include "jntarray.hpp"
27 #include "framevel.hpp"
28 
29 namespace KDL
30 {
31  // Equal is friend function, but default arguments for friends are forbidden (ยง8.3.6.4)
32  class JntArrayVel;
33  bool Equal(const JntArrayVel& src1,const JntArrayVel& src2,double eps=epsilon);
34 
35 
37  {
38  public:
39  JntArray q;
40  JntArray qdot;
41  public:
43  explicit JntArrayVel(unsigned int size);
44  JntArrayVel(const JntArray& q,const JntArray& qdot);
45  explicit JntArrayVel(const JntArray& q);
46 
47  void resize(unsigned int newSize);
48 
49  JntArray value()const;
50  JntArray deriv()const;
51 
52  friend void Add(const JntArrayVel& src1,const JntArrayVel& src2,JntArrayVel& dest);
53  friend void Add(const JntArrayVel& src1,const JntArray& src2,JntArrayVel& dest);
54  friend void Subtract(const JntArrayVel& src1,const JntArrayVel& src2,JntArrayVel& dest);
55  friend void Subtract(const JntArrayVel& src1,const JntArray& src2,JntArrayVel& dest);
56  friend void Multiply(const JntArrayVel& src,const double& factor,JntArrayVel& dest);
57  friend void Multiply(const JntArrayVel& src,const doubleVel& factor,JntArrayVel& dest);
58  friend void Divide(const JntArrayVel& src,const double& factor,JntArrayVel& dest);
59  friend void Divide(const JntArrayVel& src,const doubleVel& factor,JntArrayVel& dest);
60  friend void SetToZero(JntArrayVel& array);
61  friend bool Equal(const JntArrayVel& src1,const JntArrayVel& src2,double eps);
62 
63  };
64 }
65 
66 #endif
JntArray qdot
Definition: jntarrayvel.hpp:40
friend void SetToZero(JntArrayVel &array)
Definition: jntarrayvel.cpp:105
JntArrayVel()
Definition: jntarrayvel.hpp:42
JntArray value() const
Definition: jntarrayvel.cpp:47
friend void Divide(const JntArrayVel &src, const double &factor, JntArrayVel &dest)
Definition: jntarrayvel.cpp:92
friend void Multiply(const JntArrayVel &src, const double &factor, JntArrayVel &dest)
Definition: jntarrayvel.cpp:79
friend void Subtract(const JntArrayVel &src1, const JntArrayVel &src2, JntArrayVel &dest)
Definition: jntarrayvel.cpp:68
IMETHOD bool Equal(const FrameAcc &r1, const FrameAcc &r2, double eps=epsilon)
Definition: frameacc.hpp:394
Definition: articulatedbodyinertia.cpp:28
void resize(unsigned int newSize)
Definition: jntarrayvel.cpp:41
Definition: jntarrayvel.hpp:36
JntArray deriv() const
Definition: jntarrayvel.cpp:52
friend bool Equal(const JntArrayVel &src1, const JntArrayVel &src2, double eps)
Definition: jntarrayvel.cpp:111
friend void Add(const JntArrayVel &src1, const JntArrayVel &src2, JntArrayVel &dest)
Definition: jntarrayvel.cpp:57
Rall1d< double > doubleVel
Definition: framevel.hpp:36
JntArray q
Definition: jntarrayvel.hpp:39