OpenWalker Project
Documentation of the ROS Packages
moment.h
Go to the documentation of this file.
1 
34 #ifndef OPEN_WALKER_CORE_MOMENT_H
35 #define OPEN_WALKER_CORE_MOMENT_H
36 
37 #include <ow_core/moment_ref.h>
38 
39 namespace ow_core
40 {
48 template <typename _Scalar>
49 class Moment :
50  public MomentRef<Eigen::Matrix<_Scalar,3,1> >
51 {
52 public:
53  typedef _Scalar Scalar;
54  typedef Eigen::Matrix<_Scalar,3,1> Derived;
55  typedef MomentRef<Derived > Base;
56 
57 protected:
58  Derived data_;
59 
60 public:
64  Moment() :
65  Base(data_)
66  {
67  }
68 
73  Moment(const Scalar& x, const Scalar& y, const Scalar& z) :
74  data_(x,y,z),
75  Base(data_)
76  {
77  }
78 
85  template <typename OtherDerived>
86  Moment(const Eigen::EigenBase<OtherDerived>& other) :
87  data_(other),
88  Base(data_)
89  {
90  }
91 
95  using Base::operator=;
96 
97 };
98 
99 } // namespace ow_core
100 
101 #endif // OPEN_WALKER_CORE_MOMENT_H
The MomentRef class.
Definition: moment_ref.h:52
The Moment class.
Definition: moment.h:49
Moment(const Scalar &x, const Scalar &y, const Scalar &z)
Assignment from Scalar values.
Definition: moment.h:73
Definition: angular_acceleration.h:39
Moment()
Default Constructor.
Definition: moment.h:64
Moment(const Eigen::EigenBase< OtherDerived > &other)
Copy constructor.
Definition: moment.h:86