Changing the internal representation of Point / Pointf / Point3 / Pointf3 to Eigen Matrix types, first step

This commit is contained in:
bubnikv 2018-08-14 18:33:26 +02:00
parent 077680b806
commit 86da661097
60 changed files with 1228 additions and 1206 deletions

View file

@ -148,13 +148,13 @@ void BedShapePanel::set_shape(ConfigOptionPoints* points)
// find origin
// the || 0 hack prevents "-0" which might confuse the user
int x_min, x_max, y_min, y_max;
x_max = x_min = points->values[0].x;
y_max = y_min = points->values[0].y;
x_max = x_min = points->values[0].x();
y_max = y_min = points->values[0].y();
for (auto pt : points->values){
if (x_min > pt.x) x_min = pt.x;
if (x_max < pt.x) x_max = pt.x;
if (y_min > pt.y) y_min = pt.y;
if (y_max < pt.y) y_max = pt.y;
if (x_min > pt.x()) x_min = pt.x();
if (x_max < pt.x()) x_max = pt.x();
if (y_min > pt.y()) y_min = pt.y();
if (y_max < pt.y()) y_max = pt.y();
}
if (x_min < 0) x_min = 0;
if (x_max < 0) x_max = 0;
@ -242,8 +242,8 @@ void BedShapePanel::update_shape()
catch (const std::exception &e){
return;}
auto x = rect_size.x;
auto y = rect_size.y;
auto x = rect_size.x();
auto y = rect_size.y();
// empty strings or '-' or other things
if (x == 0 || y == 0) return;
double x0 = 0.0;
@ -251,8 +251,8 @@ void BedShapePanel::update_shape()
double x1 = x;
double y1 = y;
auto dx = rect_origin.x;
auto dy = rect_origin.y;
auto dx = rect_origin.x();
auto dy = rect_origin.y();
x0 -= dx;
x1 -= dx;