43#include <visp3/core/vpRxyzVector.h>
46const unsigned int vpRxyzVector::constr_val_3 = 3;
87 double COEF_MIN_ROT = 1e-6;
89 const unsigned int index_0 = 0;
90 const unsigned int index_1 = 1;
91 const unsigned int index_2 = 2;
93 if ((fabs(R[index_1][index_2]) < COEF_MIN_ROT) && (fabs(R[index_2][index_2]) < COEF_MIN_ROT)) {
97 phi = atan2(-R[index_1][index_2], R[index_2][index_2]);
100 double si = sin(phi);
101 double co = cos(phi);
102 double theta = atan2(R[index_0][index_2], (-si * R[index_1][index_2]) + (co * R[index_2][index_2]));
103 double psi = atan2((co * R[index_1][index_0]) + (si * R[index_2][index_0]), (co * R[index_1][index_1]) + (si * R[index_2][index_1]));
132 const unsigned int index_0 = 0;
133 const unsigned int index_1 = 1;
134 const unsigned int index_2 = 2;
136 data[index_1] = theta;
146 const unsigned int val_3 = 3;
147 if (rxyz.
size() != val_3) {
151 for (
unsigned int i = 0; i < val_3; ++i) {
163 const unsigned int val_3 = 3;
164 if (rxyz.size() != val_3) {
168 for (
unsigned int i = 0; i < val_3; ++i) {
200 for (
unsigned int i = 0; i <
dsize; ++i) {
235 const unsigned int val_3 = 3;
236 if (rxyz.
size() != val_3) {
240 for (
unsigned int i = 0; i < val_3; ++i) {
247#if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11)
271 if (list.size() >
size()) {
274 "Cannot set Euler x-y-z vector out of bounds. It has only %d values while you try to initialize with %d values",
275 size(), list.size()));
277 std::copy(list.begin(), list.end(),
data);
unsigned int size() const
Return the number of elements of the 2D array.
Implementation of column vector and the associated operations.
error that can be emitted by ViSP classes.
@ dimensionError
Bad dimension.
Implementation of a rotation matrix and operations on such kind of matrices.
vpRotationVector()
Constructor that constructs a 0-size rotation vector.
vpRxyzVector & operator=(const vpColVector &rxyz)
vpRxyzVector & buildFrom(const vpRotationMatrix &R)
Implementation of a rotation vector as axis-angle minimal representation.