// // moveFV.h // Preview3D // // Created by Olga Diamanti on 11/11/11. // Copyright (c) 2011 __MyCompanyName__. All rights reserved. // #ifndef Preview3D_moveFV_h #define Preview3D_moveFV_h namespace igl { // moveFV // Move a scalar field defined on faces to vertices by averaging // // Input: // V,F: mesh // S: scalar field defined on faces, Fx1 // // Output: // SV: scalar field defined on vertices template inline void moveFV(const Eigen::Matrix &V, const Eigen::MatrixXi &F, const Eigen::Matrix &S, Eigen::Matrix &SV); } template inline void igl::moveFV(const Eigen::Matrix &V, const Eigen::MatrixXi &F, const Eigen::Matrix &S, Eigen::Matrix &SV) { SV = Eigen::Matrix::Zero(V.rows(),S.cols()); Eigen::Matrix COUNT = Eigen::Matrix::Zero(V.rows()); for (int i = 0; i