Visual Servoing Platform  version 3.0.1
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
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
7  * modify it under the terms of the GNU General Public License
8  * ("GPL") version 2 as published by the Free Software Foundation.
9  * See the file LICENSE.txt at the root directory of this source
10  * distribution for additional information about the GNU GPL.
11  *
12  * For using ViSP with software that can not be combined with the GNU
13  * GPL, please contact Inria about acquiring a ViSP Professional
14  * Edition License.
15  *
16  * See http://visp.inria.fr for more information.
17  *
18  * This software was developed at:
19  * Inria Rennes - Bretagne Atlantique
20  * Campus Universitaire de Beaulieu
21  * 35042 Rennes Cedex
22  * France
23  *
24  * If you have questions regarding the use of this file, please contact
25  * Inria at visp@inria.fr
26  *
27  * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
28  * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
29  *
30  * Description:
31  * Theta U parameterization for the rotation.
32  *
33  * Authors:
34  * Eric Marchand
35  *
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/vpRotationVector.h>
60 #include <visp3/core/vpRotationMatrix.h>
61 #include <visp3/core/vpHomogeneousMatrix.h>
62 #include <visp3/core/vpRxyzVector.h>
63 #include <visp3/core/vpRzyxVector.h>
64 #include <visp3/core/vpQuaternionVector.h>
65 
66 
147 class VISP_EXPORT vpThetaUVector : public vpRotationVector
148 {
149 private:
150 
151  static const double minimum;
152 
153 public:
154  vpThetaUVector();
155  vpThetaUVector(const vpThetaUVector &tu);
156 
157  // constructor initialize a Theta U vector from a homogeneous matrix
159  // constructor initialize a Theta U vector from a pose vector
160  vpThetaUVector(const vpPoseVector & p) ;
161  // constructor initialize a Theta U vector from a rotation matrix
162  vpThetaUVector(const vpRotationMatrix& R) ;
163  // constructor initialize a Theta U vector from a RzyxVector
164  vpThetaUVector(const vpRzyxVector& rzyx) ;
165  // constructor initialize a Theta U vector from a RzyzVector
166  vpThetaUVector(const vpRzyzVector& rzyz) ;
167  // constructor initialize a Theta U vector from a RxyzVector
168  vpThetaUVector(const vpRxyzVector& rxyz) ;
170 
171  vpThetaUVector(const double tux, const double tuy, const double tuz);
172  vpThetaUVector(const vpColVector &tu);
174  virtual ~vpThetaUVector() {};
175 
176  // convert an homogeneous matrix into Theta U vector
177  vpThetaUVector buildFrom(const vpHomogeneousMatrix& M) ;
178  // convert a pose vector into Theta U vector
179  vpThetaUVector buildFrom(const vpPoseVector& p) ;
180  // convert a rotation matrix into Theta U vector
181  vpThetaUVector buildFrom(const vpRotationMatrix& R) ;
182  // convert an Rzyx vector into Theta U vector
183  vpThetaUVector buildFrom(const vpRzyxVector &rzyx) ;
184  // convert an Rzyz vector into Theta U vector
185  vpThetaUVector buildFrom(const vpRzyzVector &zyz) ;
186  // convert an Rxyz vector into Theta U vector
187  vpThetaUVector buildFrom(const vpRxyzVector &xyz) ;
188  vpThetaUVector buildFrom(const vpQuaternionVector &q) ;
189 
190  void buildFrom(const double tux, const double tuy, const double tuz);
191 
192  // extract the angle and the axis from the ThetaU representation
193  void extract( double &theta, vpColVector &u) const;
194  double getTheta() const;
195  vpColVector getU() const;
196 
198  vpThetaUVector &operator=(double x) ;
199 } ;
200 
201 #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:152
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:93
Implementation of a rotation vector as Euler angle minimal representation.
Definition: vpRxyzVector.h:154
Implementation of a rotation vector as Euler angle minimal representation.
Definition: vpRzyzVector.h:151
Implementation of a rotation vector as axis-angle minimal representation.