Browse Source

Stupid bug fix.

Former-commit-id: a67627fe51651bb063396f546befca81b03828f9
Qingnan Zhou 9 years ago
parent
commit
c64fc3706c
1 changed files with 4 additions and 4 deletions
  1. 4 4
      include/igl/cgal/outer_hull.cpp

+ 4 - 4
include/igl/cgal/outer_hull.cpp

@@ -348,13 +348,13 @@ IGL_INLINE void igl::cgal::outer_hull(
       {
         for(size_t c = 0;c<3;c++)
         {
-          const auto & vfc = V.row(F(f,c));
+          const auto & vfc = V.row(F(f,c)).eval();
           BB(0,0) = std::min(BB(0,0), vfc(0,0));
           BB(0,1) = std::min(BB(0,1), vfc(0,1));
           BB(0,2) = std::min(BB(0,2), vfc(0,2));
-          BB(1,0) = std::max(BB(0,0), vfc(0,0));
-          BB(1,1) = std::max(BB(0,1), vfc(0,1));
-          BB(1,2) = std::max(BB(0,2), vfc(0,2));
+          BB(1,0) = std::max(BB(1,0), vfc(0,0));
+          BB(1,1) = std::max(BB(1,1), vfc(0,1));
+          BB(1,2) = std::max(BB(1,2), vfc(0,2));
         }
       }
       return BB;