Browse Source

fixed volume size

Teseo Schneider 6 years ago
parent
commit
60c783a736
1 changed files with 1 additions and 1 deletions
  1. 1 1
      include/igl/volume.cpp

+ 1 - 1
include/igl/volume.cpp

@@ -47,7 +47,7 @@ IGL_INLINE void igl::volume(
   const auto & AmD = A-D;
   const auto & AmD = A-D;
   const auto & BmD = B-D;
   const auto & BmD = B-D;
   const auto & CmD = C-D;
   const auto & CmD = C-D;
-  Derivedvol BmDxCmD;
+  Eigen::Matrix<typename Derivedvol::Scalar,Eigen::Dynamic,3> BmDxCmD;
   cross(BmD.eval(),CmD.eval(),BmDxCmD);
   cross(BmD.eval(),CmD.eval(),BmDxCmD);
   const auto & AmDdx = (AmD.array() * BmDxCmD.array()).rowwise().sum();
   const auto & AmDdx = (AmD.array() * BmDxCmD.array()).rowwise().sum();
   vol = -AmDdx/6.;
   vol = -AmDdx/6.;