49 #include <visp/vpDebug.h>
50 #include <visp/vpMatrix.h>
51 #include <visp/vpHomogeneousMatrix.h>
52 #include <visp/vpQuaternionVector.h>
55 #include <visp/vpException.h>
56 #include <visp/vpMatrixException.h>
59 #include <visp/vpDebug.h>
80 for (i=0 ; i < 4 ; i++)
81 for (j=0 ; j < 4; j++)
133 buildFrom(p[0],p[1],p[2],p[3],p[4],p[5]) ;
328 if (v.size() != 12 && v.size() != 16) {
332 for (
unsigned int i=0; i < 12; i++)
333 this->
data[i] = (
double)v[i];
378 if (v.size() != 12 && v.size() != 16) {
382 for (
unsigned int i=0; i < 12; i++)
383 this->
data[i] = v[i];
397 for (
int i=0; i<4; i++)
399 for (
int j=0; j<4; j++)
456 for (
unsigned int j=0;j<4;j++) {
457 for (
unsigned int i=0;i<4;i++) {
490 for (i=0 ; i < 3 ; i++)
491 for (j=0 ; j < 3; j++)
492 R[i][j] = (*
this)[i][j] ;
501 tv[0] = (*this)[0][3] ;
502 tv[1] = (*this)[1][3] ;
503 tv[2] = (*this)[2][3] ;
536 for (i=0 ; i < 3 ; i++)
537 for (j=0 ; j < 3; j++)
538 (*
this)[i][j] = R[i][j] ;
560 (*this)[0][3] = T[0] ;
561 (*this)[1][3] = T[1] ;
562 (*this)[2][3] = T[2] ;
617 (*this)[0][1] = (*this)[0][2] = 0 ;
618 (*this)[1][0] = (*this)[1][2] = 0 ;
619 (*this)[2][0] = (*this)[2][1] = 0 ;
707 for (
unsigned int i=0 ; i < 4 ; i++)
708 for (
unsigned int j=0 ; j < 4 ; j++)
741 for(
unsigned int i=0; i < 12; i++)
742 M[i] = (
float)(this->
data[i]);
752 for(
unsigned int i=0; i < 12; i++)
753 M[i] = this->
data[i];
Definition of the vpMatrix class.
void resize(const unsigned int nrows, const unsigned int ncols, const bool nullify=true)
void print()
Print the matrix as a vector [T thetaU].
The class provides a data structure for the homogeneous matrices as well as a set of operations on th...
void setIdentity()
Basic initialisation (identity)
error that can be emited by ViSP classes.
vpRotationMatrix t() const
transpose
vpThetaUVector buildFrom(const vpHomogeneousMatrix &M)
void load(std::ifstream &f)
bool isARotationMatrix() const
test if the matrix is an rotation matrix
The vpRotationMatrix considers the particular case of a rotation matrix.
double * data
address of the first element of the data array
vpHomogeneousMatrix & operator=(const vpHomogeneousMatrix &M)
Copy operator from vpHomogeneousMatrix.
void insert(const vpRotationMatrix &R)
double ** rowPtrs
address of the first element of each rows
vpHomogeneousMatrix()
Basic constructor.
vpRowVector t() const
Transpose of a vector.
void extract(vpRotationMatrix &R) const
Defines a quaternion and its basic operations.
void buildFrom(const vpRotationMatrix &R)
void buildFrom(const vpTranslationVector &t, const vpRotationMatrix &R)
Construction from translation vector and rotation matrix.
bool isAnHomogeneousMatrix() const
unsigned int rowNum
number of rows
void save(std::ofstream &f) const
vpHomogeneousMatrix operator*(const vpHomogeneousMatrix &M) const
Multiply two homogeneous matrices: aMb = aMc*cMb.
Class that provides a data structure for the column vectors as well as a set of operations on these v...
The pose is a complete representation of every rigid motion in the euclidian space.
vpHomogeneousMatrix inverse() const
void init()
Basic initialisation (identity).
void convert(std::vector< float > &M)
Class that consider the case of a translation vector.
Class that consider the case of the parameterization for the rotation.