OpenWalker Project
Documentation of the ROS Packages
vector3.h
Go to the documentation of this file.
1 
34 #ifndef OPEN_WALKER_CORE_VECTOR3_H
35 #define OPEN_WALKER_CORE_VECTOR3_H
36 
37 #include <ow_core/vector3_ref.h>
38 
39 namespace ow_core
40 {
48 template <typename _Scalar>
49 class Vector3 :
50  public Vector3Ref<Eigen::Matrix<_Scalar,3,1> >
51 {
52 public:
53  typedef _Scalar Scalar;
54  typedef Eigen::Matrix<_Scalar,3,1> Derived;
55  typedef Vector3Ref<Derived > Base;
56 
57 protected:
58  Derived data_;
59 
60 public:
64  Vector3() :
65  Base(data_)
66  {
67  }
68 
73  Vector3(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  Vector3(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_VECTOR3_H
The Vector3Ref class.
Definition: vector3_ref.h:53
Definition: angular_acceleration.h:39
Vector3()
Default Constructor.
Definition: vector3.h:64
The Vector3 class.
Definition: vector3.h:49
Vector3(const Eigen::EigenBase< OtherDerived > &other)
Copy constructor.
Definition: vector3.h:86
Vector3(const Scalar &x, const Scalar &y, const Scalar &z)
Assignment from Scalar values.
Definition: vector3.h:73