Visual Servoing Platform version 3.5.0
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
50class vpPoseVector;
51class vpRzyxVector;
52class vpRxyzVector;
53class vpRzyzVector;
54class vpColVector;
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
172class VISP_EXPORT vpThetaUVector : public vpRotationVector
173{
174private:
175 static const double minimum;
176
177public:
180
181 // constructor initialize a Theta U vector from a homogeneous matrix
182 explicit vpThetaUVector(const vpHomogeneousMatrix &M);
183 // constructor initialize a Theta U vector from a pose vector
184 explicit vpThetaUVector(const vpPoseVector &p);
185 // constructor initialize a Theta U vector from a rotation matrix
186 explicit vpThetaUVector(const vpRotationMatrix &R);
187 // constructor initialize a Theta U vector from a RzyxVector
188 explicit vpThetaUVector(const vpRzyxVector &rzyx);
189 // constructor initialize a Theta U vector from a RzyzVector
190 explicit vpThetaUVector(const vpRzyzVector &rzyz);
191 // constructor initialize a Theta U vector from a RxyzVector
192 explicit vpThetaUVector(const vpRxyzVector &rxyz);
193 explicit vpThetaUVector(const vpQuaternionVector &q);
194 explicit vpThetaUVector(const vpColVector &tu);
195 explicit vpThetaUVector(const std::vector<double> &tu);
196
197 vpThetaUVector(double tux, double tuy, double tuz);
199 virtual ~vpThetaUVector(){};
200
201 // convert an homogeneous matrix into Theta U vector
202 vpThetaUVector buildFrom(const vpHomogeneousMatrix &M);
203 // convert a pose vector into Theta U vector
204 vpThetaUVector buildFrom(const vpPoseVector &p);
205 // convert a rotation matrix into Theta U vector
206 vpThetaUVector buildFrom(const vpRotationMatrix &R);
207 // convert an Rzyx vector into Theta U vector
208 vpThetaUVector buildFrom(const vpRzyxVector &rzyx);
209 // convert an Rzyz vector into Theta U vector
210 vpThetaUVector buildFrom(const vpRzyzVector &zyz);
211 // convert an Rxyz vector into Theta U vector
212 vpThetaUVector buildFrom(const vpRxyzVector &xyz);
213 vpThetaUVector buildFrom(const vpQuaternionVector &q);
214 vpThetaUVector buildFrom(const vpColVector &tu);
215 vpThetaUVector buildFrom(const std::vector<double> &tu);
216
217 void buildFrom(double tux, double tuy, double tuz);
218
219 // extract the angle and the axis from the ThetaU representation
220 void extract(double &theta, vpColVector &u) const;
221 double getTheta() const;
222 vpColVector getU() const;
223
225 vpThetaUVector &operator=(double x);
226
227#if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11)
228 vpThetaUVector &operator=(const std::initializer_list<double> &list);
229#endif
230};
231
232#endif
Implementation of column vector and the associated operations.
Definition: vpColVector.h:131
Implementation of an homogeneous matrix and operations on such kind of matrices.
Implementation of a pose vector and operations on poses.
Definition: vpPoseVector.h:152
Implementation of a rotation vector as quaternion angle minimal representation.
Implementation of a rotation matrix and operations on such kind of matrices.
Implementation of a generic rotation vector.
vpRotationVector & operator=(const vpRotationVector &v)
Implementation of a rotation vector as Euler angle minimal representation.
Definition: vpRxyzVector.h:184
Implementation of a rotation vector as Euler angle minimal representation.
Definition: vpRzyxVector.h:186
Implementation of a rotation vector as Euler angle minimal representation.
Definition: vpRzyzVector.h:183
Implementation of a rotation vector as axis-angle minimal representation.
virtual ~vpThetaUVector()
Destructor.