From 7f2aac509e650ac595d69540154490f8f8069333 Mon Sep 17 00:00:00 2001 From: ponchio Date: Wed, 30 Nov 2005 14:05:04 +0000 Subject: [PATCH] Fixed some UberZ fuynctions and non defined _flags --- vcg/simplex/edge/base.h | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/vcg/simplex/edge/base.h b/vcg/simplex/edge/base.h index 817c6bd1..2c22f83a 100644 --- a/vcg/simplex/edge/base.h +++ b/vcg/simplex/edge/base.h @@ -24,6 +24,10 @@ History $Log: not supported by cvs2svn $ +Revision 1.9 2005/10/14 12:34:55 cignoni +Added ordered constructor that build a edge with unique ordering +among vertices (useful for edge-collapse simplification) + Revision 1.8 2005/10/01 09:22:51 cignoni Major rewriting of the whole class edge. Removed default flags and nonsense attibutes. Given consistent naming to defines. @@ -434,29 +438,29 @@ public: */ inline char & UberZ( const int j ) { - assert(j>=0); - j<2); + assert(j>=0 && j<2); #if defined(__VCGLIB_EDGE_AE) return zs[j]; #elif defined(__VCGLIB_EDGE_SA) return zs[j]; #else assert(0); - return *(char *)&_flags; + static char dummy = 0; + return dummy; #endif } inline const char & UberZ( const int j ) const { - assert(j>=0); - j<2); + assert(j>=0 & j<2); #if defined(__VCGLIB_EDGE_AE) return zs[j]; #elif defined(__VCGLIB_EDGE_SA) return zs[j]; #else assert(0); - return *(char *)&_flags; + static int dummy = 0; + return dummy; #endif } @@ -464,30 +468,30 @@ public: inline char & VEi( const int j ) { assert( !IsD() ); - assert(j>=0); - j<2); + assert(j>=0 & j<2); #ifdef __VCGLIB_EDGE_VA return zv[j]; #elif defined(__VCGLIB_EDGE_SA) return zs[j]; #else assert(0); - return *(char *)&_flags; + static char dummy = 0; + return dummy; #endif } inline const char & VEi( const int j ) const { assert( !IsD() ); - assert(j>=0); - j<2); + assert(j>=0 & j<2); #ifdef __VCGLIB_EDGE_VA return zv[j]; #elif defined(__VCGLIB_EDGE_SA) return zs[j]; #else assert(0); - return *(char *)&_flags; + static char dummy = 0; + return dummy; #endif } @@ -521,8 +525,13 @@ public: inline const int & IMark() const { assert( !IsD() ); +#ifdef __VCGLIB_EDGE_EM assert( (_flags & NOTREAD) == 0 ); return imark; +#else + static int dummy = 0; + return dummy; +#endif } /// Initialize the imark system of the face