Visual Servoing Platform
version 3.7.0
Toggle main menu visibility
Loading...
Searching...
No Matches
vpRotationVector.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
* Generic rotation vector (cannot be used as is !).
32
*/
33
39
40
#ifndef VP_ROTATION_VECTOR_H
41
#define VP_ROTATION_VECTOR_H
42
43
#include <iostream>
44
#include <math.h>
45
#include <stdio.h>
46
47
#include <visp3/core/vpConfig.h>
48
#include <visp3/core/vpArray2D.h>
49
50
BEGIN_VISP_NAMESPACE
51
52
class
vpRowVector
;
53
class
vpColVector
;
54
101
102
class
VISP_EXPORT
vpRotationVector
:
public
vpArray2D
<double>
103
{
104
public
:
106
vpRotationVector
() :
vpArray2D
<double>(),
m_index
(0) { }
107
110
VP_EXPLICIT
vpRotationVector
(
unsigned
int
n) :
vpArray2D
<double>(n, 1),
m_index
(0) { }
111
115
vpRotationVector
(
const
vpRotationVector
&v) :
vpArray2D
<double>(v),
m_index
(0) { }
116
119
124
inline
double
&
operator[]
(
unsigned
int
i) {
return
*(
data
+ i); }
129
inline
const
double
&
operator[]
(
unsigned
int
i)
const
{
return
*(
data
+ i); }
130
134
vpRotationVector
&
operator=
(
const
vpRotationVector
&v)
135
{
136
resize
(v.size(), 1);
137
unsigned
int
v_size = v.size();
138
for
(
unsigned
int
i = 0; i < v_size; ++i) {
139
data
[i] = v.data[i];
140
}
141
return
*
this
;
142
}
143
144
vpColVector
operator*(
double
x)
const
;
145
146
vpRotationVector
&
operator<<
(
double
val);
147
vpRotationVector
&operator,(
double
val);
148
149
double
sumSquare()
const
;
150
151
// Transpose of the rotation vector.
152
vpRowVector
t
()
const
;
153
154
std::vector<double> toStdVector()
const
;
155
157
158
protected
:
159
unsigned
int
m_index
;
// index used for operator<< and operator, to fill a vector
160
};
161
162
#ifndef DOXYGEN_SHOULD_SKIP_THIS
163
VISP_EXPORT
164
#endif
165
VISP_NAMESPACE_ADDRESSING
vpColVector
operator*(
const
double
&x,
const
VISP_NAMESPACE_ADDRESSING
vpRotationVector
&v);
166
END_VISP_NAMESPACE
167
#endif
vpArray2D< double >::data
double * data
Definition
vpArray2D.h:149
vpArray2D< double >::vpArray2D
vpArray2D()
Definition
vpArray2D.h:155
vpArray2D::resize
void resize(unsigned int nrows, unsigned int ncols, bool flagNullify=true, bool recopy_=true)
Definition
vpArray2D.h:448
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
vpRotationVector
Implementation of a generic rotation vector.
Definition
vpRotationVector.h:103
vpRotationVector::operator[]
double & operator[](unsigned int i)
Definition
vpRotationVector.h:124
vpRotationVector::vpRotationVector
vpRotationVector(const vpRotationVector &v)
Definition
vpRotationVector.h:115
vpRotationVector::m_index
unsigned int m_index
Definition
vpRotationVector.h:159
vpRotationVector::operator=
vpRotationVector & operator=(const vpRotationVector &v)
Definition
vpRotationVector.h:134
vpRotationVector::vpRotationVector
vpRotationVector()
Constructor that constructs a 0-size rotation vector.
Definition
vpRotationVector.h:106
vpRotationVector::operator[]
const double & operator[](unsigned int i) const
Definition
vpRotationVector.h:129
vpRotationVector::vpRotationVector
VP_EXPLICIT vpRotationVector(unsigned int n)
Definition
vpRotationVector.h:110
vpRowVector
Implementation of row vector and the associated operations.
Definition
vpRowVector.h:124
BEGIN_VISP_NAMESPACE
Definition
vpMbtDistanceCircle.cpp:55
modules
core
include
visp3
core
vpRotationVector.h
Generated by
1.17.0