When reading a file with 2D points, read the x and y, and ignore the rest of the line. This implies 1 point per line.

This commit is contained in:
Andreas Fabri 2013-01-08 10:31:41 +01:00
parent 0955b5de75
commit 1ae5df0172
1 changed files with 2 additions and 0 deletions

View File

@ -330,6 +330,8 @@ MainWindow::open(QString fileName)
K::Point_2 p;
std::vector<K::Point_2> points;
while(ifs >> p) {
// ignore whatever comes after x and y
ifs.ignore((std::numeric_limits<std::streamsize>::max)(), '\n');
points.push_back(p);
}
dt.insert(points.begin(), points.end());