#ifndef IGL_SHARP_EDGES_H #define IGL_SHARP_EDGES_H #include #include #include namespace igl { // SHARP_EDGES Given a mesh, compute sharp edges. // // Inputs: // V #V by 3 list of vertex positions // F #F by 3 list of triangle mesh indices into V // angle dihedral angle considered to sharp (e.g., igl::PI * 0.11) // Outputs: // SE #SE by 2 list of edge indices into V // uE #uE by 2 list of unique undirected edges // EMAP #F*3 list of indices into uE, mapping each directed edge to unique // undirected edge so that uE(EMAP(f+#F*c)) is the unique edge // corresponding to E.row(f+#F*c) // uE2E #uE list of lists of indices into E of coexisting edges, so that // E.row(uE2E[i][j]) corresponds to uE.row(i) for all j in // 0..uE2E[i].size()-1. // sharp #SE list of indices into uE revealing sharp undirected edges template < typename DerivedV, typename DerivedF, typename DerivedSE, typename DerivedE, typename DeriveduE, typename DerivedEMAP, typename uE2Etype, typename sharptype> IGL_INLINE void 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); template < typename DerivedV, typename DerivedF, typename DerivedSE> IGL_INLINE void sharp_edges( const Eigen::MatrixBase & V, const Eigen::MatrixBase & F, const typename DerivedV::Scalar angle, Eigen::PlainObjectBase & SE ); } #ifndef IGL_STATIC_LIBRARY # include "sharp_edges.cpp" #endif #endif