// This file is part of libigl, a simple c++ geometry processing library. // // Copyright (C) 2020 Oded Stein // // 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 "edge_vectors.h" #include #include "per_face_normals.h" #include "PI.h" template IGL_INLINE void igl::edge_vectors( const Eigen::MatrixBase &V, const Eigen::MatrixBase &F, const Eigen::MatrixBase &E, const Eigen::MatrixBase &oE, Eigen::PlainObjectBase &vec) { Eigen::Matrix dummy; edge_vectors(V, F, E, oE, vec, dummy); } template IGL_INLINE void igl::edge_vectors( const Eigen::MatrixBase &V, const Eigen::MatrixBase &F, const Eigen::MatrixBase &E, const Eigen::MatrixBase &oE, Eigen::PlainObjectBase &vecParallel, Eigen::PlainObjectBase &vecPerpendicular) { using Scalar = typename DerivedvecParallel::Scalar; using MatX = Eigen::Matrix; assert(E.rows()==F.rows() && "E does not match dimensions of F."); assert(oE.rows()==F.rows() && "oE does not match dimensions of F."); assert(E.cols()==3 && F.cols()==3 && oE.cols()==3 && "This method is for triangle meshes."); assert(F.maxCoeff()(0.5*PI, edgeN.row(e)) * vecParallel.row(e).transpose(); } } } } #ifdef IGL_STATIC_LIBRARY // Explicit template instantiation template void igl::edge_vectors, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix >(Eigen::MatrixBase > const&, Eigen::MatrixBase > const&, Eigen::MatrixBase > const&, Eigen::MatrixBase > const&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&); #endif