Ver Fonte

Change "bary.resize( DIM , 1 )" to "bary.resize( DIM )"

With "bary.resize( DIM , 1 )", bary is assumed Eigen::VectorXd. But sometimes bary is Eigen::RowVectorXd (e.g. void igl::AABB<DerivedV,DIM>::leaf_squared_distance in AABB.cpp) and which causes compile error with signed_distance function(s). So I remove "1".


Former-commit-id: 3bfcd9e0a1aad7b0bf85d8e094be642358e929fc
KazutakaNakashima há 8 anos atrás
pai
commit
86f98760ad
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      include/igl/point_simplex_squared_distance.cpp

+ 1 - 1
include/igl/point_simplex_squared_distance.cpp

@@ -113,7 +113,7 @@ IGL_INLINE void igl::point_simplex_squared_distance(
   assert(Ele.cols() <= DIM+1);
   assert(Ele.cols() <= 3 && "Only simplices up to triangles are considered");
 
-  bary.resize( DIM, 1 );
+  bary.resize( DIM );
   c = ClosestBaryPtPointTriangle(
     p,
     V.row(Ele(primitive,0)),