From 2e37c07f08af9ae548e0c6e42686ac4f317e89e0 Mon Sep 17 00:00:00 2001 From: don bright Date: Sat, 20 Apr 2013 14:08:04 -0700 Subject: fix eigen2 building bug rept by Roland Hieber 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 scale, bbox_size; - scale << 1,1,1; - bbox_size << bb.xmax()-bb.xmin(), bb.ymax()-bb.ymin(), bb.zmax()-bb.zmin(); + std::vector 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; } -- cgit v0.10.1