// This file is part of libigl, a simple c++ geometry processing library. // // Copyright (C) 2015 Daniele Panozzo // // 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 "angles.h" #include template < typename DerivedV, typename DerivedF, typename Derivedtheta> void igl::angles( Eigen::PlainObjectBase& V, Eigen::PlainObjectBase& F, Eigen::PlainObjectBase& theta) { theta.resize(F.rows(),F.cols()); auto corner = [](const Eigen::PlainObjectBase& x, const Eigen::PlainObjectBase& y, const Eigen::PlainObjectBase& z) { Eigen::RowVector3d v1 = (x-y).normalized(); Eigen::RowVector3d v2 = (z-y).normalized(); return acos(v1 * v2.transpose()); }; for(unsigned i=0; i