Visual Servoing Platform
version 3.7.0
Toggle main menu visibility
Loading...
Searching...
No Matches
vpRotationMatrix.h
1
/*
2
* ViSP, open source Visual Servoing Platform software.
3
* Copyright (C) 2005 - 2024 by Inria. All rights reserved.
4
*
5
* This software is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License as published by
7
* the Free Software Foundation; either version 2 of the License, or
8
* (at your option) any later version.
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 https://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
* Rotation matrix.
32
*/
33
38
39
#ifndef VP_ROTATION_MATRIX_H
40
#define VP_ROTATION_MATRIX_H
41
42
#include <visp3/core/vpConfig.h>
43
#include <visp3/core/vpArray2D.h>
44
#include <visp3/core/vpHomogeneousMatrix.h>
45
#include <visp3/core/vpPoseVector.h>
46
#include <visp3/core/vpQuaternionVector.h>
47
#include <visp3/core/vpRxyzVector.h>
48
#include <visp3/core/vpRzyxVector.h>
49
#include <visp3/core/vpRzyzVector.h>
50
#include <visp3/core/vpThetaUVector.h>
51
#include <visp3/core/vpTranslationVector.h>
52
53
BEGIN_VISP_NAMESPACE
129
class
VISP_EXPORT
vpRotationMatrix
:
public
vpArray2D
<double>
130
{
131
public
:
132
vpRotationMatrix
();
133
vpRotationMatrix
(
const
vpRotationMatrix
&R);
134
VP_EXPLICIT
vpRotationMatrix
(
const
vpHomogeneousMatrix
&M);
135
VP_EXPLICIT
vpRotationMatrix
(
const
vpThetaUVector
&r);
136
VP_EXPLICIT
vpRotationMatrix
(
const
vpPoseVector
&p);
137
VP_EXPLICIT
vpRotationMatrix
(
const
vpRzyzVector
&r);
138
VP_EXPLICIT
vpRotationMatrix
(
const
vpRxyzVector
&r);
139
VP_EXPLICIT
vpRotationMatrix
(
const
vpRzyxVector
&r);
140
VP_EXPLICIT
vpRotationMatrix
(
const
vpQuaternionVector
&q);
141
VP_EXPLICIT
vpRotationMatrix
(
const
vpMatrix
&R);
142
vpRotationMatrix
(
double
tux,
double
tuy,
double
tuz);
143
144
#if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11)
145
VP_EXPLICIT
vpRotationMatrix
(
const
std::initializer_list<double> &list);
146
#endif
147
148
vpRotationMatrix
&
buildFrom
(
const
vpHomogeneousMatrix
&M);
149
vpRotationMatrix
&
buildFrom
(
const
vpThetaUVector
&v);
150
vpRotationMatrix
&
buildFrom
(
const
vpPoseVector
&p);
151
vpRotationMatrix
&
buildFrom
(
const
vpRzyzVector
&v);
152
vpRotationMatrix
&
buildFrom
(
const
vpRxyzVector
&v);
153
vpRotationMatrix
&
buildFrom
(
const
vpRzyxVector
&v);
154
vpRotationMatrix
&
buildFrom
(
const
vpQuaternionVector
&q);
155
vpRotationMatrix
&
buildFrom
(
const
double
&tux,
const
double
&tuy,
const
double
&tuz);
156
157
void
eye
();
158
159
vpColVector
getCol
(
unsigned
int
j)
const
;
160
vpThetaUVector
getThetaUVector
();
161
162
vpRotationMatrix
inverse
()
const
;
163
void
inverse
(
vpRotationMatrix
&R)
const
;
164
165
bool
isARotationMatrix
(
double
threshold = 1e-6)
const
;
166
167
// copy operator from vpRotationMatrix
168
vpRotationMatrix
&
operator=
(
const
vpRotationMatrix
&R);
169
// copy operator from vpMatrix (handle with care)
170
vpRotationMatrix
&
operator=
(
const
vpMatrix
&M);
171
#if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11)
172
vpRotationMatrix
&
operator=
(
const
std::initializer_list<double> &list);
173
#endif
174
// operation c = A * b (A is unchanged)
175
vpTranslationVector
operator*
(
const
vpTranslationVector
&tv)
const
;
176
// operation C = A * B (A is unchanged)
177
vpRotationMatrix
operator*
(
const
vpRotationMatrix
&R)
const
;
178
// operation C = A * B (A is unchanged)
179
vpHomogeneousMatrix
operator*
(
const
vpHomogeneousMatrix
&M)
const
;
180
vpMatrix
operator*
(
const
vpMatrix
&M)
const
;
181
// operation v2 = A * v1 (A is unchanged)
182
vpColVector
operator*
(
const
vpColVector
&v)
const
;
183
vpRotationMatrix
operator*
(
double
x)
const
;
184
vpRotationMatrix
&
operator*=
(
double
x);
185
186
vpRotationMatrix
&
operator<<
(
double
val);
187
vpRotationMatrix
&
operator,
(
double
val);
188
189
void
orthogonalize
();
190
191
void
printVector
();
192
198
VP_NORETURN
void
resize
(
unsigned
int
nrows,
unsigned
int
ncols,
bool
flagNullify =
true
)
199
{
200
(void)nrows;
201
(void)ncols;
202
(void)flagNullify;
203
throw
(
vpException
(
vpException::fatalError
,
"Cannot resize a rotation matrix"
));
204
}
205
206
// transpose
207
vpRotationMatrix
t
()
const
;
208
209
static
vpRotationMatrix
mean(
const
std::vector<vpHomogeneousMatrix> &vec_M);
210
static
vpRotationMatrix
mean(
const
std::vector<vpRotationMatrix> &vec_R);
211
212
#if defined(VISP_BUILD_DEPRECATED_FUNCTIONS)
217
221
VP_DEPRECATED
void
init
() { }
225
VP_DEPRECATED
void
setIdentity();
227
#endif
228
229
protected
:
230
unsigned
int
m_index
;
231
private
:
232
static
const
unsigned
int
constr_val_3;
233
};
234
235
#ifndef DOXYGEN_SHOULD_SKIP_THIS
236
VISP_EXPORT
237
#endif
238
VISP_NAMESPACE_ADDRESSING
vpRotationMatrix
operator*(
const
double
&x,
const
VISP_NAMESPACE_ADDRESSING
vpRotationMatrix
&R);
239
END_VISP_NAMESPACE
240
#endif
vpArray2D::operator=
vpArray2D< Type > & operator=(Type x)
Set all the elements of the array to x.
Definition
vpArray2D.h:615
vpArray2D< double >::vpArray2D
vpArray2D()
Definition
vpArray2D.h:155
vpArray2D::operator<<
friend std::ostream & operator<<(std::ostream &s, const vpArray2D< Type > &A)
Definition
vpArray2D.h:705
vpArray2D::t
vpArray2D< Type > t() const
Compute the transpose of the array.
Definition
vpArray2D.h:1273
vpColVector
Implementation of column vector and the associated operations.
Definition
vpColVector.h:191
vpException
error that can be emitted by ViSP classes.
Definition
vpException.h:60
vpException::fatalError
@ fatalError
Fatal error.
Definition
vpException.h:72
vpHomogeneousMatrix
Implementation of an homogeneous matrix and operations on such kind of matrices.
Definition
vpHomogeneousMatrix.h:221
vpMatrix
Implementation of a matrix and operations on matrices.
Definition
vpMatrix.h:175
vpPoseVector
Implementation of a pose vector and operations on poses.
Definition
vpPoseVector.h:203
vpQuaternionVector
Implementation of a rotation vector as quaternion angle minimal representation.
Definition
vpQuaternionVector.h:106
vpRotationMatrix
Implementation of a rotation matrix and operations on such kind of matrices.
Definition
vpRotationMatrix.h:130
vpRotationMatrix::init
VP_DEPRECATED void init()
Definition
vpRotationMatrix.h:221
vpRotationMatrix::eye
void eye()
Definition
vpRotationMatrix.cpp:59
vpRotationMatrix::operator*=
vpRotationMatrix & operator*=(double x)
Definition
vpRotationMatrix.cpp:446
vpRotationMatrix::isARotationMatrix
bool isARotationMatrix(double threshold=1e-6) const
Definition
vpRotationMatrix.cpp:465
vpRotationMatrix::orthogonalize
void orthogonalize()
Definition
vpRotationMatrix.cpp:1045
vpRotationMatrix::operator,
vpRotationMatrix & operator,(double val)
Definition
vpRotationMatrix.cpp:259
vpRotationMatrix::m_index
unsigned int m_index
Definition
vpRotationMatrix.h:230
vpRotationMatrix::getCol
vpColVector getCol(unsigned int j) const
Definition
vpRotationMatrix.cpp:943
vpRotationMatrix::getThetaUVector
vpThetaUVector getThetaUVector()
Definition
vpRotationMatrix.cpp:905
vpRotationMatrix::vpRotationMatrix
vpRotationMatrix()
Definition
vpRotationMatrix.cpp:513
vpRotationMatrix::buildFrom
vpRotationMatrix & buildFrom(const vpHomogeneousMatrix &M)
Definition
vpRotationMatrix.cpp:737
vpRotationMatrix::resize
VP_NORETURN void resize(unsigned int nrows, unsigned int ncols, bool flagNullify=true)
Definition
vpRotationMatrix.h:198
vpRotationMatrix::inverse
vpRotationMatrix inverse() const
Definition
vpRotationMatrix.cpp:645
vpRotationMatrix::operator*
vpTranslationVector operator*(const vpTranslationVector &tv) const
Definition
vpRotationMatrix.cpp:407
vpRotationMatrix::printVector
void printVector()
Definition
vpRotationMatrix.cpp:679
vpRxyzVector
Implementation of a rotation vector as Euler angle minimal representation.
Definition
vpRxyzVector.h:183
vpRzyxVector
Implementation of a rotation vector as Euler angle minimal representation.
Definition
vpRzyxVector.h:184
vpRzyzVector
Implementation of a rotation vector as Euler angle minimal representation.
Definition
vpRzyzVector.h:182
vpThetaUVector
Implementation of a rotation vector as axis-angle minimal representation.
Definition
vpThetaUVector.h:172
vpTranslationVector
Class that consider the case of a translation vector.
Definition
vpTranslationVector.h:119
BEGIN_VISP_NAMESPACE
Definition
vpMbtDistanceCircle.cpp:55
modules
core
include
visp3
core
vpRotationMatrix.h
Generated by
1.17.0