42 #include <visp3/core/vpRzyzVector.h>
89 const unsigned int index_0 = 0;
90 const unsigned int index_1 = 1;
91 const unsigned int index_2 = 2;
92 if ((fabs(R[index_1][index_2]) < 1e-6) && (fabs(R[index_0][index_2]) < 1e-6)) {
96 phi = atan2(R[index_1][index_2], R[index_0][index_2]);
98 double cphi = cos(phi);
99 double sphi = sin(phi);
101 double theta = atan2((cphi * R[index_0][index_2]) + (sphi * R[index_1][index_2]), R[index_2][index_2]);
103 double psi = atan2((-sphi * R[0][0]) + (cphi * R[1][0]), (-sphi * R[0][1]) + (cphi * R[1][1]));
130 if (rzyz.
size() != 3) {
134 const unsigned int val_3 = 3;
135 for (
unsigned int i = 0; i < val_3; ++i) {
147 if (rzyz.size() != 3) {
151 const unsigned int val_3 = 3;
152 for (
unsigned int i = 0; i < val_3; ++i) {
167 const unsigned int index_0 = 0;
168 const unsigned int index_1 = 1;
169 const unsigned int index_2 = 2;
171 data[index_1] = theta;
201 for (
unsigned int i = 0; i <
dsize; ++i) {
236 if (rzyz.
size() != 3) {
240 const unsigned int val_3 = 3;
241 for (
unsigned int i = 0; i < val_3; ++i) {
248 #if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11)
272 if (list.size() >
size()) {
275 "Cannot set Euler x-y-z vector out of bounds. It has only %d values while you try to initialize with %d values",
276 size(), list.size()));
278 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.
vpRzyzVector & buildFrom(const vpRotationMatrix &R)
vpRzyzVector & operator=(const vpColVector &rzyz)
Implementation of a rotation vector as axis-angle minimal representation.