From 45c1e138005114fb20e536768c9489dcbc760219 Mon Sep 17 00:00:00 2001 From: Paolo Cignoni Date: Mon, 13 Mar 2017 15:39:39 +0100 Subject: [PATCH] Corrected IsEdgeManifold test function --- vcg/simplex/edge/topology.h | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/vcg/simplex/edge/topology.h b/vcg/simplex/edge/topology.h index c3e4c8b8..87cf13f0 100644 --- a/vcg/simplex/edge/topology.h +++ b/vcg/simplex/edge/topology.h @@ -31,17 +31,16 @@ namespace vcg { namespace edge { /** \addtogroup edge */ -/*@{*/template -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)) ); - else - return true; + +template +inline bool IsEdgeManifold( EdgeType const & e, const int j ) +{ + 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. @param j Index of the edge @return true if j is an edge of border, false otherwise