Corrected IsEdgeManifold test function

This commit is contained in:
Paolo Cignoni 2017-03-13 15:39:39 +01:00
parent 5cebf19dc5
commit 45c1e13800
1 changed files with 7 additions and 8 deletions

View File

@ -31,17 +31,16 @@
namespace vcg { namespace vcg {
namespace edge { namespace edge {
/** \addtogroup edge */ /** \addtogroup edge */
/*@{*/template <class EdgeType> /*@{*/
inline bool IsEdgeManifoldFF( EdgeType const & e, const int j )
{
assert(e.cFFp(j) != 0); // never try to use this on uncomputed topology
if(EdgeType::HasFFAdjacency())
return ( e.cFFp(j) == &e || &e == e.cFFp(j)->cFFp(e.cFFi(j)) ); template <class EdgeType>
else inline bool IsEdgeManifold( EdgeType const & e, const int j )
return true; {
return ( e.cEEp(j) == &e || &e == e.cEEp(j)->cEEp(e.cEEi(j)) );
} }
/** Return a boolean that indicate if the j-th edge of the face is a border. /** Return a boolean that indicate if the j-th edge of the face is a border.
@param j Index of the edge @param j Index of the edge
@return true if j is an edge of border, false otherwise @return true if j is an edge of border, false otherwise