42 #include <visp3/core/vpForceTwistMatrix.h>
43 #include <visp3/core/vpException.h>
44 #include <visp3/core/vpDebug.h>
64 for (
int i=0; i<6; i++) {
65 for (
int j=0; j<6; j++) {
80 for (
unsigned int i=0 ; i < 6 ; i++) {
81 for (
unsigned int j=0 ; j < 6; j++) {
186 const double tux,
const double tuy,
const double tuz)
217 for (
unsigned int i=0;i<6;i++) {
218 for (
unsigned int j=0;j<6;j++) {
220 for (
unsigned int k=0;k<6;k++)
240 "Cannot multiply (6x6) force/torque twist matrix by a (%dx%d) matrix",
246 for (
unsigned int i=0;i<6;i++) {
247 for (
unsigned int j=0;j<M.
getCols();j++) {
249 for (
unsigned int k=0;k<6;k++)
310 "Cannot multiply a (6x6) force/torque twist matrix by a %d dimension column vector",
316 for (
unsigned int i=0;i<6;i++) {
317 for (
unsigned int j=0;j<6;j++) {
343 for (i=0 ; i < 3 ; i++) {
344 for (j=0 ; j < 3 ; j++) {
345 (*this)[i][j] = R[i][j] ;
346 (*this)[i+3][j+3] = R[i][j] ;
347 (*this)[i+3][j] = skewaR[i][j] ;
418 typedef std::string::size_type size_type;
423 std::vector<std::string> values(m*n);
424 std::ostringstream oss;
425 std::ostringstream ossFixed;
426 std::ios_base::fmtflags original_flags = oss.flags();
429 ossFixed.setf ( std::ios::fixed, std::ios::floatfield );
431 size_type maxBefore=0;
432 size_type maxAfter=0;
434 for (
unsigned int i=0;i<m;++i) {
435 for (
unsigned int j=0;j<n;++j){
437 oss << (*this)[i][j];
438 if (oss.str().find(
"e")!=std::string::npos){
440 ossFixed << (*this)[i][j];
441 oss.str(ossFixed.str());
444 values[i*n+j]=oss.str();
445 size_type thislen=values[i*n+j].size();
446 size_type p=values[i*n+j].find(
'.');
448 if (p==std::string::npos){
458 size_type totalLength=length;
462 maxAfter=std::min(maxAfter, totalLength-maxBefore);
463 if (maxAfter==1) maxAfter=0;
468 if (intro) s <<intro;
469 s <<
"["<<m<<
","<<n<<
"]=\n";
471 for (
unsigned int i=0;i<m;i++) {
473 for (
unsigned int j=0;j<n;j++){
474 size_type p=values[i*n+j].find(
'.');
475 s.setf(std::ios::right, std::ios::adjustfield);
476 s.width((std::streamsize)maxBefore);
477 s <<values[i*n+j].substr(0,p).c_str();
480 s.setf(std::ios::left, std::ios::adjustfield);
481 if (p!=std::string::npos){
482 s.width((std::streamsize)maxAfter);
483 s <<values[i*n+j].substr(p,maxAfter).c_str();
486 s.width((std::streamsize)maxAfter);
496 s.flags(original_flags);
498 return (
int)(maxBefore+maxAfter);
501 #if defined(VISP_BUILD_DEPRECATED_FUNCTIONS)
515 #endif //#if defined(VISP_BUILD_DEPRECATED_FUNCTIONS)
vpForceTwistMatrix buildFrom(const vpTranslationVector &t, const vpRotationMatrix &R)
Implementation of a matrix and operations on matrices.
Implementation of an homogeneous matrix and operations on such kind of matrices.
vpForceTwistMatrix & operator=(const vpForceTwistMatrix &H)
error that can be emited by ViSP classes.
Implementation of a generic 2D array used as vase class of matrices and vectors.
unsigned int getCols() const
Return the number of columns of the 2D array.
vp_deprecated void setIdentity()
static Type maximum(const Type &a, const Type &b)
Implementation of a rotation matrix and operations on such kind of matrices.
vpRotationMatrix buildFrom(const vpHomogeneousMatrix &M)
vpForceTwistMatrix operator*(const vpForceTwistMatrix &F) const
void extract(vpRotationMatrix &R) const
unsigned int getRows() const
Return the number of rows of the 2D array.
Implementation of a force/torque twist matrix and operations on such kind of matrices.
Implementation of column vector and the associated operations.
int print(std::ostream &s, unsigned int length, char const *intro=0) const
Class that consider the case of a translation vector.
Implementation of a rotation vector as axis-angle minimal representation.
double ** rowPtrs
Address of the first element of each rows.