43 #include <visp3/core/vpRxyzVector.h>
81 #ifdef VISP_BUILD_DEPRECATED_FUNCTIONS
118 build(phi, theta, psi);
151 double COEF_MIN_ROT = 1e-6;
153 const unsigned int index_0 = 0;
154 const unsigned int index_1 = 1;
155 const unsigned int index_2 = 2;
157 if ((fabs(R[index_1][index_2]) < COEF_MIN_ROT) && (fabs(R[index_2][index_2]) < COEF_MIN_ROT)) {
161 phi = atan2(-R[index_1][index_2], R[index_2][index_2]);
164 double si = sin(phi);
165 double co = cos(phi);
166 double theta = atan2(R[index_0][index_2], (-si * R[index_1][index_2]) + (co * R[index_2][index_2]));
167 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]));
169 build(phi, theta, psi);
197 const unsigned int index_0 = 0;
198 const unsigned int index_1 = 1;
199 const unsigned int index_2 = 2;
201 data[index_1] = theta;
211 if (rxyz.
size() != 3) {
215 const unsigned int val_3 = 3;
216 for (
unsigned int i = 0; i < val_3; ++i) {
228 if (rxyz.size() != 3) {
232 const unsigned int val_3 = 3;
233 for (
unsigned int i = 0; i < val_3; ++i) {
265 for (
unsigned int i = 0; i <
dsize; ++i) {
300 if (rxyz.
size() != 3) {
304 const unsigned int val_3 = 3;
305 for (
unsigned int i = 0; i < val_3; ++i) {
312 #if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11)
336 if (list.size() >
size()) {
339 "Cannot set Euler x-y-z vector out of bounds. It has only %d values while you try to initialize with %d values",
340 size(), list.size()));
342 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.
VP_DEPRECATED vpRxyzVector buildFrom(const vpRotationMatrix &R)
vpRxyzVector & build(const vpRotationMatrix &R)
vpRxyzVector & operator=(const vpColVector &rxyz)
Implementation of a rotation vector as axis-angle minimal representation.