// This file is part of libigl, a simple c++ geometry processing library. // // Copyright (C) 2014 Alec Jacobson // // This Source Code Form is subject to the terms of the Mozilla Public License // v. 2.0. If a copy of the MPL was not distributed with this file, You can // obtain one at http://mozilla.org/MPL/2.0/. #include "harmonic.h" #include "cotmatrix.h" #include "massmatrix.h" #include "invert_diag.h" #include "min_quad_with_fixed.h" #include template < typename DerivedV, typename DerivedF, typename Derivedb, typename Derivedbc, typename DerivedW> IGL_INLINE bool igl::harmonic( const Eigen::PlainObjectBase & V, const Eigen::PlainObjectBase & F, const Eigen::PlainObjectBase & b, const Eigen::PlainObjectBase & bc, const int k, Eigen::PlainObjectBase & W) { using namespace Eigen; typedef typename DerivedV::Scalar Scalar; typedef Matrix VectorXS; SparseMatrix L,M,Mi; cotmatrix(V,F,L); switch(F.cols()) { case 3: massmatrix(V,F,MASSMATRIX_TYPE_VORONOI,M); break; case 4: default: massmatrix(V,F,MASSMATRIX_TYPE_BARYCENTRIC,M); break; } invert_diag(M,Mi); SparseMatrix Q = -L; for(int p = 1;p data; min_quad_with_fixed_precompute(Q,b,SparseMatrix(),true,data); W.resize(V.rows(),bc.cols()); for(int w = 0;w, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, int, Eigen::PlainObjectBase >&); template bool igl::harmonic, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, int, Eigen::PlainObjectBase >&); #endif