42#include <visp3/core/vpRzyzVector.h>
45const unsigned int vpRzyzVector::constr_val_3 = 3;
87 const unsigned int index_0 = 0;
88 const unsigned int index_1 = 1;
89 const unsigned int index_2 = 2;
90 if ((fabs(R[index_1][index_2]) < 1e-6) && (fabs(R[index_0][index_2]) < 1e-6)) {
94 phi = atan2(R[index_1][index_2], R[index_0][index_2]);
96 double cphi = cos(phi);
97 double sphi = sin(phi);
99 double theta = atan2((cphi * R[index_0][index_2]) + (sphi * R[index_1][index_2]), R[index_2][index_2]);
101 double psi = atan2((-sphi * R[0][0]) + (cphi * R[1][0]), (-sphi * R[0][1]) + (cphi * R[1][1]));
127 const unsigned int val_3 = 3;
128 if (rzyz.
size() != val_3) {
132 for (
unsigned int i = 0; i < val_3; ++i) {
144 const unsigned int val_3 = 3;
145 if (rzyz.size() != val_3) {
149 for (
unsigned int i = 0; i < val_3; ++i) {
164 const unsigned int index_0 = 0;
165 const unsigned int index_1 = 1;
166 const unsigned int index_2 = 2;
168 data[index_1] = theta;
198 for (
unsigned int i = 0; i <
dsize; ++i) {
233 const unsigned int val_3 = 3;
234 if (rzyz.
size() != val_3) {
238 for (
unsigned int i = 0; i < val_3; ++i) {
245#if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11)
269 if (list.size() >
size()) {
272 "Cannot set Euler x-y-z vector out of bounds. It has only %d values while you try to initialize with %d values",
273 size(), list.size()));
275 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.
vpRzyzVector & buildFrom(const vpRotationMatrix &R)
vpRzyzVector & operator=(const vpColVector &rzyz)
Implementation of a rotation vector as axis-angle minimal representation.