ViSP  2.10.0
vpRotationMatrix.h
1 /****************************************************************************
2  *
3  * $Id: vpRotationMatrix.h 5037 2014-12-05 19:06:41Z fspindle $
4  *
5  * This file is part of the ViSP software.
6  * Copyright (C) 2005 - 2014 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  * Rotation matrix.
36  *
37  * Authors:
38  * Eric Marchand
39  *
40  *****************************************************************************/
41 
42 
43 #ifndef vpROTATIONMATRIX_H
44 #define vpROTATIONMATRIX_H
45 
51 #include <visp/vpHomogeneousMatrix.h>
52 #include <visp/vpMatrix.h>
53 #include <visp/vpRxyzVector.h>
54 #include <visp/vpRzyxVector.h>
55 #include <visp/vpRzyzVector.h>
56 #include <visp/vpThetaUVector.h>
57 #include <visp/vpTranslationVector.h>
58 #include <visp/vpQuaternionVector.h>
59 #include <visp/vpPoseVector.h>
60 
74 class VISP_EXPORT vpRotationMatrix : public vpMatrix
75 {
76  friend class vpMatrix;
77  friend class vpHomogeneousMatrix;
78  friend class vpRxyzVector;
79  friend class vpRzyzVector;
80  friend class vpRzyxVector;
81  friend class vpThetaUVector;
82  friend class vpTranslationVector;
83  friend class vpPoseVector;
84 public:
86  void init() ;
87 
89  void setIdentity() ;
90  void eye();
100  vpRotationMatrix(const vpPoseVector &p) ;
102  vpRotationMatrix(const vpRzyzVector &r) ;
104  vpRotationMatrix(const vpRxyzVector &r) ;
106  vpRotationMatrix(const vpRzyxVector &r) ;
108  vpRotationMatrix(const double tux, const double tuy, const double tuz) ;
109 
111 
112 // /*!
113 // Return the \f$\theta u\f$ vector that corresponds to tha rotation matrix.
114 // */
115 // vpThetaUVector getThetaUVector()
116 // {
117 // vpThetaUVector tu;
118 // tu.buildFrom(*this);
119 // return tu;
120 // }
121 
125  vpRotationMatrix &operator=(const vpMatrix &m) ;
131  vpMatrix operator*(const vpMatrix &B) const ;
132  // operation v2 = A * v1 (A is unchanged)
133  vpColVector operator*(const vpColVector &v) const ;
138 
140  vpRotationMatrix t() const ;
141 
143  vpRotationMatrix inverse() const ;
145  void inverse(vpRotationMatrix &M) const;
146 
148  bool isARotationMatrix() const ;
149 
151  void printVector() ;
152  friend VISP_EXPORT std::ostream &operator << (std::ostream &s, const vpRotationMatrix &m);
153 
168  vpRotationMatrix buildFrom(const double tux,
169  const double tuy,
170  const double tuz) ;
171 
173 private:
174  static const double threshold;
175  static const double minimum; // useful only for debug
176  };
177 
178 #endif
179 
180 /*
181  * Local variables:
182  * c-basic-offset: 2
183  * End:
184  */
friend VISP_EXPORT std::ostream & operator<<(std::ostream &s, const vpMatrix &m)
std::cout a matrix
Definition: vpMatrix.cpp:2894
Definition of the vpMatrix class.
Definition: vpMatrix.h:98
void init()
Initialization of the object matrix.
Definition: vpMatrix.cpp:98
The class provides a data structure for the homogeneous matrices as well as a set of operations on th...
Class that consider the case of the Euler angle using the z-y-x convention, where are respectively ...
Definition: vpRzyxVector.h:151
vpPoseVector buildFrom(const vpHomogeneousMatrix &M)
The vpRotationMatrix considers the particular case of a rotation matrix.
void setIdentity(const double &val=1.0)
Definition: vpMatrix.cpp:1230
vpMatrix & operator=(const vpMatrix &B)
Copy operator. Allow operation such as A = B.
Definition: vpMatrix.cpp:385
vpMatrix operator+(const vpMatrix &B) const
Definition: vpMatrix.cpp:653
Defines a quaternion and its basic operations.
void eye(unsigned int n)
Definition: vpMatrix.cpp:1252
vpMatrix t() const
Definition: vpMatrix.cpp:1296
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
vpMatrix operator*(const vpMatrix &B) const
Definition: vpMatrix.cpp:523
Class that consider the case of the Euler angle using the x-y-z convention, where are respectively ...
Definition: vpRxyzVector.h:152
vpMatrix operator-() const
Definition: vpMatrix.cpp:860
Class that consider the case of the Euler angles using the z-y-z convention, where are respectively...
Definition: vpRzyzVector.h:150
Class that consider the case of a translation vector.
Class that consider the case of the parameterization for the rotation.