44 #include <visp3/core/vpRzyxVector.h>
82 #ifdef VISP_BUILD_DEPRECATED_FUNCTIONS
122 build(phi, theta, psi);
158 const unsigned int index_0 = 0;
159 const unsigned int index_1 = 1;
160 const unsigned int index_2 = 2;
161 double nx = R[index_0][index_0];
162 double ny = R[index_1][index_0];
164 double COEF_MIN_ROT = 1e-6;
167 if ((fabs(nx) < COEF_MIN_ROT) && (fabs(ny) < COEF_MIN_ROT)) {
173 double si = sin(phi);
174 double co = cos(phi);
176 double nz = R[index_2][index_0];
177 double theta = atan2(-nz, (co * nx) + (si * ny));
179 double ax = R[index_0][index_2];
180 double ay = R[index_1][index_2];
181 double ox = R[index_0][index_1];
182 double oy = R[index_1][index_1];
184 double psi = atan2((si * ax) - (co * ay), (-si * ox) + (co * oy));
186 build(phi, theta, psi);
214 const unsigned int index_0 = 0;
215 const unsigned int index_1 = 1;
216 const unsigned int index_2 = 2;
218 data[index_1] = theta;
228 if (rzyx.
size() != 3) {
232 const unsigned int val_3 = 3;
233 for (
unsigned int i = 0; i < val_3; ++i) {
245 if (rzyx.size() != 3) {
249 const unsigned int val_3 = 3;
250 for (
unsigned int i = 0; i < val_3; ++i) {
282 for (
unsigned int i = 0; i <
dsize; ++i) {
317 if (rzyx.
size() != 3) {
321 const unsigned int val_3 = 3;
322 for (
unsigned int i = 0; i < val_3; ++i) {
329 #if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11)
353 if (list.size() >
size()) {
356 "Cannot set Euler x-y-z vector out of bounds. It has only %d values while you try to initialize with %d values",
357 size(), list.size()));
359 std::copy(list.begin(), list.end(),
data);
double * data
Address of the first element of the data array.
unsigned int dsize
Current array size (rowNum * colNum)
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.
vpRotationMatrix & build(const vpHomogeneousMatrix &M)
Implementation of a generic rotation vector.
Implementation of a rotation vector as Euler angle minimal representation.
vpRzyxVector & operator=(const vpColVector &rzyx)
VP_DEPRECATED vpRzyxVector buildFrom(const vpRotationMatrix &R)
vpRzyxVector & build(const vpRotationMatrix &R)
Implementation of a rotation vector as axis-angle minimal representation.