ViSP  2.8.0
vpPoseVector.h
1 /****************************************************************************
2  *
3  * $Id: vpPoseVector.h 4056 2013-01-05 13:04:42Z fspindle $
4  *
5  * This file is part of the ViSP software.
6  * Copyright (C) 2005 - 2013 by INRIA. All rights reserved.
7  *
8  * This software is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License
10  * ("GPL") version 2 as published by the Free Software Foundation.
11  * See the file LICENSE.txt at the root directory of this source
12  * distribution for additional information about the GNU GPL.
13  *
14  * For using ViSP with software that can not be combined with the GNU
15  * GPL, please contact INRIA about acquiring a ViSP Professional
16  * Edition License.
17  *
18  * See http://www.irisa.fr/lagadic/visp/visp.html for more information.
19  *
20  * This software was developed at:
21  * INRIA Rennes - Bretagne Atlantique
22  * Campus Universitaire de Beaulieu
23  * 35042 Rennes Cedex
24  * France
25  * http://www.irisa.fr/lagadic
26  *
27  * If you have questions regarding the use of this file, please contact
28  * INRIA at visp@inria.fr
29  *
30  * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
31  * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
32  *
33  *
34  * Description:
35  * Pose object. A pose is a size 6 vector [t, tu]^T where tu is
36  * a rotation vector (theta u representation) and t is a translation vector.
37  *
38  * Authors:
39  * Eric Marchand
40  * Fabien Spindler
41  *
42  *****************************************************************************/
43 
44 
45 #ifndef vpPOSEVECTOR_H
46 #define vpPOSEVECTOR_H
47 
55 class vpRotationMatrix;
58 class vpThetaUVector;
59 
60 #include <visp/vpMatrix.h>
61 #include <visp/vpRotationMatrix.h>
62 #include <visp/vpHomogeneousMatrix.h>
63 
64 class vpRotationMatrix;
67 class vpThetaUVector;
68 
69 
92 class VISP_EXPORT vpPoseVector : public vpColVector
93 {
94 
95  private:
96  // initialize a size 6 vector
97  void init() ;
98 
99  public:
100  // constructor
101  vpPoseVector() ;
102  // constructor from 3 angles (in radian)
103  vpPoseVector(const double tx, const double ty, const double tz,
104  const double tux, const double tuy, const double tuz) ;
105  // constructor convert an homogeneous matrix in a pose
107  // constructor convert a translation and a "thetau" vector into a pose
109  const vpThetaUVector& tu) ;
110  // constructor convert a translation and a rotation matrix into a pose
112  const vpRotationMatrix& R) ;
113 
114 
115  // convert an homogeneous matrix in a pose
116  vpPoseVector buildFrom(const vpHomogeneousMatrix& M) ;
117  // convert a translation and a "thetau" vector into a pose
118  vpPoseVector buildFrom(const vpTranslationVector& t,
119  const vpThetaUVector& tu) ;
120  // convert a translation and a rotation matrix into a pose
121  vpPoseVector buildFrom(const vpTranslationVector& t,
122  const vpRotationMatrix& R) ;
123 
124 
149  inline double &operator [](unsigned int i) { return *(data + i); }
168  inline const double &operator [](unsigned int i) const { return *(data+i); }
169 
170  // Load an homogeneous matrix from a file
171  void load(std::ifstream &f) ;
172  // Save an homogeneous matrix in a file
173  void save(std::ofstream &f) const ;
174 
175  // Print a vector [T thetaU] thetaU in degree
176  void print() ;
177 } ;
178 
179 #endif
180 
181 /*
182  * Local variables:
183  * c-basic-offset: 2
184  * End:
185  */
186 
void init()
Initialization of the object matrix.
Definition: vpMatrix.cpp:93
The class provides a data structure for the homogeneous matrices as well as a set of operations on th...
double & operator[](unsigned int n)
Access V[i] = x.
Definition: vpColVector.h:99
int print(std::ostream &s, unsigned int length, char const *intro=0)
Definition: vpMatrix.cpp:2615
The vpRotationMatrix considers the particular case of a rotation matrix.
Class that provides a data structure for the column vectors as well as a set of operations on these v...
Definition: vpColVector.h:72
The pose is a complete representation of every rigid motion in the euclidian space.
Definition: vpPoseVector.h:92
Class that consider the case of a translation vector.
Class that consider the case of the parameterization for the rotation.