// This file is part of libigl, a simple c++ geometry processing library. // // Copyright (C) 2017 Amir Vaxman // // 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 #include #include #include #include #include //This file implements several basic local projection functions for the shapeup algorithm in shapeup.h namespace igl { //This projection does nothing but render points into projP. Mostly used for "echoing" the global step IGL_INLINE bool shapeup_identity_projection(const Eigen::PlainObjectBase& P, const Eigen::PlainObjectBase& SC, const Eigen::PlainObjectBase& S, Eigen::PlainObjectBase& projP){ projP.conservativeResize(SC.rows(), 3*SC.maxCoeff()); for (int i=0;i& P, const Eigen::PlainObjectBase& SC, const Eigen::PlainObjectBase& S, Eigen::PlainObjectBase& projP){ projP.conservativeResize(SC.rows(), 3*SC.maxCoeff()); for (int currRow=0;currRow svd(corrMat, Eigen::ComputeFullU | Eigen::ComputeFullV); Eigen::MatrixXd R=svd.matrixU()*svd.matrixV().transpose(); //getting scale by edge length change average. TODO: by singular values Eigen::VectorXd sourceEdgeLengths(N); Eigen::VectorXd targetEdgeLengths(N); for (int j=0;j