diff options
author | Marius Kintel <marius@kintel.net> | 2013-04-24 06:00:28 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2013-04-24 06:00:28 (GMT) |
commit | b5922d7551340d53551e48c01aa09af33e94c317 (patch) | |
tree | 862084764cff82870c3aac0b32e7106ec9518970 /src/CGALEvaluator.cc | |
parent | 6a87dd5cfa0a272f978e1b22ca59f1c8c55505a7 (diff) | |
parent | f0ee85e17d474ab9119f82ee6f802d4634743b12 (diff) |
Merge branch 'master' into issue116
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; } |