瀏覽代碼

row/col major bug

Former-commit-id: e235a215b459f9c2a34dceeeb0c248b3e197f250
Alec Jacobson 9 年之前
父節點
當前提交
d30ee51bdc
共有 1 個文件被更改,包括 5 次插入2 次删除
  1. 5 2
      include/igl/copyleft/boolean/CSGTree.h

+ 5 - 2
include/igl/copyleft/boolean/CSGTree.h

@@ -153,9 +153,12 @@ namespace igl
           {
             Eigen::PlainObjectBase<DerivedV> dV;
             dV.resize(m_V.rows(),m_V.cols());
-            for(int i = 0;i<m_V.size();i++)
+            for(int i = 0;i<m_V.rows();i++)
             {
-              *(dV.data()+i) = CGAL::to_double((*(m_V.data()+i)));
+              for(int j = 0;j<m_V.cols();j++)
+              {
+                dV(i,j) = CGAL::to_double(m_V(i,j));
+              }
             }
             return dV;
           }