43 #include <visp3/core/vpRxyzVector.h>
90 double COEF_MIN_ROT = 1e-6;
92 const unsigned int index_0 = 0;
93 const unsigned int index_1 = 1;
94 const unsigned int index_2 = 2;
96 if ((fabs(R[index_1][index_2]) < COEF_MIN_ROT) && (fabs(R[index_2][index_2]) < COEF_MIN_ROT)) {
100 phi = atan2(-R[index_1][index_2], R[index_2][index_2]);
103 double si = sin(phi);
104 double co = cos(phi);
105 double theta = atan2(R[index_0][index_2], (-si * R[index_1][index_2]) + (co * R[index_2][index_2]));
106 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]));
136 const unsigned int index_0 = 0;
137 const unsigned int index_1 = 1;
138 const unsigned int index_2 = 2;
140 data[index_1] = theta;
150 if (rxyz.
size() != 3) {
154 const unsigned int val_3 = 3;
155 for (
unsigned int i = 0; i < val_3; ++i) {
167 if (rxyz.size() != 3) {
171 const unsigned int val_3 = 3;
172 for (
unsigned int i = 0; i < val_3; ++i) {
204 for (
unsigned int i = 0; i <
dsize; ++i) {
239 if (rxyz.
size() != 3) {
243 const unsigned int val_3 = 3;
244 for (
unsigned int i = 0; i < val_3; ++i) {
251 #if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11)
275 if (list.size() >
size()) {
278 "Cannot set Euler x-y-z vector out of bounds. It has only %d values while you try to initialize with %d values",
279 size(), list.size()));
281 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 & buildFrom(const vpHomogeneousMatrix &M)
Implementation of a generic rotation vector.
Implementation of a rotation vector as Euler angle minimal representation.
vpRxyzVector & operator=(const vpColVector &rxyz)
vpRxyzVector & buildFrom(const vpRotationMatrix &R)
Implementation of a rotation vector as axis-angle minimal representation.