diff options
author | don bright <hugh.m.bright@gmail.com> | 2013-04-20 21:08:04 (GMT) |
---|---|---|
committer | don bright <hugh.m.bright@gmail.com> | 2013-04-20 21:08:04 (GMT) |
commit | 2e37c07f08af9ae548e0c6e42686ac4f317e89e0 (patch) | |
tree | 2f6161f9a0c8a6be861160066ff1b896f5d73008 /src/CGALEvaluator.cc | |
parent | eb60b5f9377b71115741d9632f9b62f77c441dbc (diff) |
fix eigen2 building bug rept by Roland Hieber
Diffstat (limited to 'src/CGALEvaluator.cc')
-rw-r--r-- | src/CGALEvaluator.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/CGALEvaluator.cc b/src/CGALEvaluator.cc index 7c483cb..6ad9e4d 100644 --- a/src/CGALEvaluator.cc +++ b/src/CGALEvaluator.cc @@ -206,9 +206,11 @@ CGAL_Nef_polyhedron CGALEvaluator::applyResize(const CgaladvNode &node) bb = bounding_box( *N.p3 ); } - Eigen::Matrix<NT,3,1> scale, bbox_size; - scale << 1,1,1; - bbox_size << bb.xmax()-bb.xmin(), bb.ymax()-bb.ymin(), bb.zmax()-bb.zmin(); + std::vector<NT> scale, bbox_size; + for (int i=0;i<3;i++) scale.push_back( NT(1) ); + bbox_size.push_back( bb.xmax()-bb.xmin() ); + bbox_size.push_back( bb.ymax()-bb.ymin() ); + bbox_size.push_back( bb.zmax()-bb.zmin() ); for (int i=0;i<3;i++) { if (node.newsize[i]) { if (bbox_size[i]==NT(0)) { @@ -220,7 +222,7 @@ CGAL_Nef_polyhedron CGALEvaluator::applyResize(const CgaladvNode &node) } } } - NT autoscale = scale.maxCoeff(); + NT autoscale = std::max( scale[0], std::max( scale[1], scale[2] )); for (int i=0;i<3;i++) { if (node.autosize[i]) scale[i] = autoscale; } |