#include template IGL_INLINE void igl::global2local( const Eigen::PlainObjectBase& B1, const Eigen::PlainObjectBase& B2, const Eigen::PlainObjectBase& global, Eigen::PlainObjectBase& local) { int n = global.cols()/3; //get 2D vectors from 3D vectors local.resize(global.rows(), n*2); for (int i =0; i &g = global.block(i, k*3,1,3); local.block(i, k*2,1,2) << g.dot(B1.row(i).template cast()), g.dot(B2.row(i).template cast()) ; } } } template IGL_INLINE void igl::local2global( const Eigen::PlainObjectBase& B1, const Eigen::PlainObjectBase& B2, const Eigen::PlainObjectBase& local, Eigen::PlainObjectBase& global) { int n = local.cols()/2; //get 3D vectors from 2D vectors global.resize(local.rows(), n*3); for (int i =0; i &l = local.block(i, k*2,1,2); global.block(i, k*3, 1,3) = l[0]*B1.row(i).template cast() + l[1]*B2.row(i).template cast() ; } } } #ifdef IGL_STATIC_LIBRARY // Explicit template specialization template void igl::global2local, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase >&); template void igl::local2global, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase >&); #endif