- Timestamp:
- 01/09/08 15:22:12 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/LogReader.cpp
r2580 r2584 12 12 13 13 14 /*void LogReader::Read(ViewCellHistoryContainer &history)14 void LogReader::Read(int &numSamples, ViewCellInfoContainer &infos) 15 15 { 16 int numViewCells, numSamples; 17 18 // open file 19 std::ifstream src(mFilename.c_str()); 20 21 if (src.is_open()) 22 { 23 src >> numViewCells; 24 src >> numSamples; 25 26 while (!src.eof()) 27 { 28 ViewCellInfoContainer *infos = new ViewCellInfoContainer(); 29 30 for (size_t i = 0; i << numViewCells; ++ i) 31 { 32 ViewCellInfo info; 33 src >> info.mPiercingRays; 34 infos->push_back(info); 35 } 36 37 history[numSamples] = infos; 38 } 39 40 src.close(); 41 } 42 }*/ 43 44 45 void LogReader::Read(const int numSamples, ViewCellInfoContainer &infos) 46 { 47 char filename[64]; 16 //char filename[64]; 48 17 //sprintf(filename, "%s %06d", mFilename.c_str(), numSamples); 49 50 18 // open file 51 19 std::ifstream src(mFilename.c_str()); … … 53 21 if (src.is_open()) 54 22 { 55 while (!src.eof()) 23 src >> numSamples; 24 25 while (1) 56 26 { 57 27 ViewCellInfo info; 58 src >> info.mPiercingRays; 59 28 src >> info.mPiercingRays; src >> info.mPvsSize; 29 30 if (src.eof()) break; 31 60 32 infos.push_back(info); 61 33 }
Note: See TracChangeset
for help on using the changeset viewer.