Visual Servoing Platform  version 3.1.0
vpThetaUVector.h
1 /****************************************************************************
2  *
3  * This file is part of the ViSP software.
4  * Copyright (C) 2005 - 2017 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 
169  vpThetaUVector(const double tux, const double tuy, const double tuz);
170  explicit vpThetaUVector(const vpColVector &tu);
172  virtual ~vpThetaUVector(){};
173 
174  // convert an homogeneous matrix into Theta U vector
175  vpThetaUVector buildFrom(const vpHomogeneousMatrix &M);
176  // convert a pose vector into Theta U vector
177  vpThetaUVector buildFrom(const vpPoseVector &p);
178  // convert a rotation matrix into Theta U vector
179  vpThetaUVector buildFrom(const vpRotationMatrix &R);
180  // convert an Rzyx vector into Theta U vector
181  vpThetaUVector buildFrom(const vpRzyxVector &rzyx);
182  // convert an Rzyz vector into Theta U vector
183  vpThetaUVector buildFrom(const vpRzyzVector &zyz);
184  // convert an Rxyz vector into Theta U vector
185  vpThetaUVector buildFrom(const vpRxyzVector &xyz);
186  vpThetaUVector buildFrom(const vpQuaternionVector &q);
187 
188  void buildFrom(const double tux, const double tuy, const double tuz);
189 
190  // extract the angle and the axis from the ThetaU representation
191  void extract(double &theta, vpColVector &u) const;
192  double getTheta() const;
193  vpColVector getU() const;
194 
196  vpThetaUVector &operator=(double x);
197 };
198 
199 #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.