to_string.h
Go to the documentation of this file.
00001 #ifndef TOSTRING_H
00002 #define TOSTRING_H
00003 #include <QString>
00004 #include <cstdlib>
00005 
00006 inline QString toString( const vcg::Point4f& p ){
00007   QString s;
00008   s.sprintf("%f %f %f %f", p[0], p[1], p[2], p[3]);
00009   return s;
00010 }
00011 inline QString toString( const vcg::Point3f& p ){
00012   QString s;
00013   s.sprintf("%f %f %f", p[0], p[1], p[2]);
00014   return s;
00015 }
00016 inline QString toString( const vcg::Point2f& p ){
00017   QString s;
00018   s.sprintf("%f %f", p[0], p[1]);
00019   return s;
00020 }
00021 inline QString toString( const vcg::Point2i& p ){
00022   QString s;
00023   s.sprintf("%d %d", p[0], p[1]);
00024   return s;
00025 }
00026 inline QString toString(vcg::Matrix44f& m){
00027   QString mat;
00028   for(int i=0; i<3; i++){
00029       mat.append( toString( m.GetRow4(i) ) );
00030       mat.append("\n");
00031   }
00032   return mat;
00033 }
00034 #endif // TOSTRING_H


shape_reconstruction
Author(s): Roberto Martín-Martín
autogenerated on Sat Jun 8 2019 18:37:20