#include "sharp_edges.h" #include "unique_edge_map.h" #include "per_face_normals.h" #include "PI.h" #include template < typename DerivedV, typename DerivedF, typename DerivedSE, typename DerivedE, typename DeriveduE, typename DerivedEMAP, typename uE2Etype, typename sharptype> IGL_INLINE void igl::sharp_edges( const Eigen::MatrixBase & V, const Eigen::MatrixBase & F, const typename DerivedV::Scalar angle, Eigen::PlainObjectBase & SE, Eigen::PlainObjectBase & E, Eigen::PlainObjectBase & uE, Eigen::PlainObjectBase & EMAP, std::vector > & uE2E, std::vector< sharptype > & sharp) { typedef typename DerivedSE::Scalar Index; typedef typename DerivedV::Scalar Scalar; typedef Eigen::Matrix MatrixX3S; typedef Eigen::Matrix RowVector3S; unique_edge_map(F,E,uE,EMAP,uE2E); MatrixX3S N; per_face_normals(V,F,N); // number of faces const Index m = F.rows(); // Dihedral angles //std::vector > DIJV; sharp.clear(); // Loop over each unique edge for(int u = 0;u angle) { u_is_sharp = true; } } if(u_is_sharp) { sharp.push_back(u); } } SE.resize(sharp.size(),2); for(int i = 0;i IGL_INLINE void igl::sharp_edges( const Eigen::MatrixBase & V, const Eigen::MatrixBase & F, const typename DerivedV::Scalar angle, Eigen::PlainObjectBase & SE ) { typedef typename DerivedSE::Scalar Index; typedef Eigen::Matrix MatrixX2I; typedef Eigen::Matrix VectorXI; MatrixX2I E,uE; VectorXI EMAP; std::vector > uE2E; std::vector sharp; return sharp_edges(V,F,angle,SE,E,uE,EMAP,uE2E,sharp); } #ifdef IGL_STATIC_LIBRARY // Explicit template instantiation template void igl::sharp_edges, Eigen::Matrix, Eigen::Matrix >(Eigen::MatrixBase > const&, Eigen::MatrixBase > const&, Eigen::Matrix::Scalar, Eigen::PlainObjectBase >&); template void igl::sharp_edges, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, int, int>(Eigen::MatrixBase > const&, Eigen::MatrixBase > const&, Eigen::Matrix::Scalar, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, std::vector >, std::allocator > > >&, std::vector >&); #endif