ddesbuis |
Code :
- std::ifstream f_ptx(nomficptx.c_str (), ios::in);
- if(f_ptx.fail())
- {
- cerr << "Erreur d'ouverture du fichier PTX : " << nomficptx << endl;
- system("pause" );
- exit(0);
- }
- std::string::size_type index = nomficptx.find("." );
-
- std::string nomficlogout = nomficptx.substr( 0, index) + "_ptx.log";
- std::ofstream f_out(nomficlogout.c_str (), ios::out);
-
- f_out << fixed;
-
- SCANWORLD::ScanWorld SWtemp;
- SCANWORLD::Scan Sctemp;
-
- f_ptx >> Sctemp.NbL;
- while (!f_ptx.eof())
- {
- f_out << Sctemp.NbL << std::endl;
- f_ptx >> Sctemp.NbC;
-
- f_ptx >> SWtemp.Xp >> SWtemp.Yp >> SWtemp.Zp;
-
- boost::numeric::ublas::matrix<double> Rtemp (3, 3);
-
- f_ptx >> Rtemp (0, 0) >> Rtemp (0, 1) >> Rtemp (0, 2);
- f_ptx >> Rtemp (1, 0) >> Rtemp (1, 1) >> Rtemp (1, 2);
- f_ptx >> Rtemp (2, 0) >> Rtemp (2, 1) >> Rtemp (2, 2);
-
- SWtemp.R.SetR (Rtemp);
-
- std::string ligne;
- std::getline(f_ptx, ligne); // fin de la dernière ligne matrice R
- std::getline(f_ptx, ligne);
- std::getline(f_ptx, ligne);
- std::getline(f_ptx, ligne);
- std::getline(f_ptx, ligne);
-
- Sctemp.PosBegin = f_ptx.tellg ();
-
- f_out << Sctemp.NbPts () << "\n";
-
- for (unsigned int i=0; i<Sctemp.NbPts (); i++) std::getline(f_ptx, ligne);
-
- f_out << "fin scan \n";
- f_ptx >> Sctemp.NbL;
- }
-
- f_out.close();
- f_ptx.close();
|
voila le code, j'ai enlevé du code qui n'a rien a voir avec le probleme pour simplifier, donc c'est normal que ce code ne semble rien faire d'interressant |