Changed the maxx initializiation to use (*points)[last_valid_index].x();

This commit is contained in:
Robert Osfield 2003-04-17 13:36:41 +00:00
parent fd262554ac
commit 67f5cc46c1

View File

@ -215,11 +215,13 @@ bool DelaunayTriangulator::triangulate()
// find the minimum and maximum x values in the point list
float minx = (*points)[0].x();
float maxx = minx;
float maxx = (*points)[last_valid_index].x();
// find the minimum and maximum x values in the point list
float miny = (*points)[0].y();
float maxy = miny;
osg::notify(osg::INFO) << "DelaunayTriangulator: finding minimum and maximum Y values\n";
osg::Vec3Array::const_iterator mmi;
for (mmi=points->begin(); mmi!=points->end(); ++mmi) {