38 #include <visp3/core/vpRxyzVector.h>
90 double COEF_MIN_ROT = 1e-6;
93 if ((fabs(R[1][2]) < COEF_MIN_ROT) && (fabs(R[2][2]) < COEF_MIN_ROT)) {
97 phi = atan2(-R[1][2], R[2][2]);
100 double si = sin(phi);
101 double co = cos(phi);
102 double theta = atan2(R[0][2], (-si * R[1][2]) + (co * R[2][2]));
103 double psi = atan2((co * R[1][0]) + (si * R[2][0]), (co * R[1][1]) + (si * R[2][1]));
143 if (rxyz.
size() != 3) {
147 for (
unsigned int i = 0; i < 3; ++i) {
159 if (rxyz.size() != 3) {
163 for (
unsigned int i = 0; i < 3; ++i) {
191 for (
unsigned int i = 0; i <
dsize; ++i) {
222 if (rxyz.
size() != 3) {
226 for (
unsigned int i = 0; i < 3; ++i) {
233 #if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11)
253 if (list.size() >
size()) {
256 "Cannot set Euler x-y-z vector out of bounds. It has only %d values while you try to initialize with %d values",
257 size(), list.size()));
259 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 buildFrom(const vpRotationMatrix &R)
vpRxyzVector & operator=(const vpColVector &rxyz)
Implementation of a rotation vector as axis-angle minimal representation.