Visual Servoing Platform  version 3.2.0 under development (2019-01-22)
vpThetaUVector.h
1 /****************************************************************************
2  *
3  * ViSP, open source Visual Servoing Platform software.
4  * Copyright (C) 2005 - 2019 by Inria. All rights reserved.
5  *
6  * This software is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  * See the file LICENSE.txt at the root directory of this source
11  * distribution for additional information about the GNU GPL.
12  *
13  * For using ViSP with software that can not be combined with the GNU
14  * GPL, please contact Inria about acquiring a ViSP Professional
15  * Edition License.
16  *
17  * See http://visp.inria.fr for more information.
18  *
19  * This software was developed at:
20  * Inria Rennes - Bretagne Atlantique
21  * Campus Universitaire de Beaulieu
22  * 35042 Rennes Cedex
23  * France
24  *
25  * If you have questions regarding the use of this file, please contact
26  * Inria at visp@inria.fr
27  *
28  * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
29  * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
30  *
31  * Description:
32  * Theta U parameterization for the rotation.
33  *
34  * Authors:
35  * Eric Marchand
36  *
37  *****************************************************************************/
38 
39 #ifndef vpTHETAUVECTOR_H
40 #define vpTHETAUVECTOR_H
41 
49 class vpRotationMatrix;
50 class vpPoseVector;
51 class vpRzyxVector;
52 class vpRxyzVector;
53 class vpRzyzVector;
54 class vpColVector;
55 class vpRotationVector;
56 class vpQuaternionVector;
57 
58 #include <visp3/core/vpColVector.h>
59 #include <visp3/core/vpHomogeneousMatrix.h>
60 #include <visp3/core/vpQuaternionVector.h>
61 #include <visp3/core/vpRotationMatrix.h>
62 #include <visp3/core/vpRotationVector.h>
63 #include <visp3/core/vpRxyzVector.h>
64 #include <visp3/core/vpRzyxVector.h>
65 
146 class VISP_EXPORT vpThetaUVector : public vpRotationVector
147 {
148 private:
149  static const double minimum;
150 
151 public:
152  vpThetaUVector();
153  vpThetaUVector(const vpThetaUVector &tu);
154 
155  // constructor initialize a Theta U vector from a homogeneous matrix
156  explicit vpThetaUVector(const vpHomogeneousMatrix &M);
157  // constructor initialize a Theta U vector from a pose vector
158  explicit vpThetaUVector(const vpPoseVector &p);
159  // constructor initialize a Theta U vector from a rotation matrix
160  explicit vpThetaUVector(const vpRotationMatrix &R);
161  // constructor initialize a Theta U vector from a RzyxVector
162  explicit vpThetaUVector(const vpRzyxVector &rzyx);
163  // constructor initialize a Theta U vector from a RzyzVector
164  explicit vpThetaUVector(const vpRzyzVector &rzyz);
165  // constructor initialize a Theta U vector from a RxyzVector
166  explicit vpThetaUVector(const vpRxyzVector &rxyz);
167  explicit vpThetaUVector(const vpQuaternionVector &q);
168  explicit vpThetaUVector(const vpColVector &tu);
169  explicit vpThetaUVector(const std::vector<double> &tu);
170 
171  vpThetaUVector(const double tux, const double tuy, const double tuz);
173  virtual ~vpThetaUVector(){};
174 
175  // convert an homogeneous matrix into Theta U vector
176  vpThetaUVector buildFrom(const vpHomogeneousMatrix &M);
177  // convert a pose vector into Theta U vector
178  vpThetaUVector buildFrom(const vpPoseVector &p);
179  // convert a rotation matrix into Theta U vector
180  vpThetaUVector buildFrom(const vpRotationMatrix &R);
181  // convert an Rzyx vector into Theta U vector
182  vpThetaUVector buildFrom(const vpRzyxVector &rzyx);
183  // convert an Rzyz vector into Theta U vector
184  vpThetaUVector buildFrom(const vpRzyzVector &zyz);
185  // convert an Rxyz vector into Theta U vector
186  vpThetaUVector buildFrom(const vpRxyzVector &xyz);
187  vpThetaUVector buildFrom(const vpQuaternionVector &q);
188  vpThetaUVector buildFrom(const vpColVector &tu);
189  vpThetaUVector buildFrom(const std::vector<double> &tu);
190 
191  void buildFrom(const double tux, const double tuy, const double tuz);
192 
193  // extract the angle and the axis from the ThetaU representation
194  void extract(double &theta, vpColVector &u) const;
195  double getTheta() const;
196  vpColVector getU() const;
197 
199  vpThetaUVector &operator=(double x);
200 };
201 
202 #endif
vpRotationVector & operator=(const vpRotationVector &v)
Implementation of a generic rotation vector.
Implementation of an homogeneous matrix and operations on such kind of matrices.
Implementation of a rotation vector as Euler angle minimal representation.
Definition: vpRzyxVector.h:158
virtual ~vpThetaUVector()
Destructor.
Implementation of a rotation matrix and operations on such kind of matrices.
Implementation of a rotation vector as quaternion angle minimal representation.
Implementation of column vector and the associated operations.
Definition: vpColVector.h:72
Implementation of a pose vector and operations on poses.
Definition: vpPoseVector.h:92
Implementation of a rotation vector as Euler angle minimal representation.
Definition: vpRxyzVector.h:156
Implementation of a rotation vector as Euler angle minimal representation.
Definition: vpRzyzVector.h:154
Implementation of a rotation vector as axis-angle minimal representation.