Fixed some UberZ fuynctions and non defined _flags

This commit is contained in:
Federico Ponchio 2005-11-30 14:05:04 +00:00
parent 0b08afa4f8
commit 7f2aac509e
1 changed files with 21 additions and 12 deletions

View File

@ -24,6 +24,10 @@
History History
$Log: not supported by cvs2svn $ $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 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. 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 ) inline char & UberZ( const int j )
{ {
assert(j>=0); assert(j>=0 && j<2);
j<2);
#if defined(__VCGLIB_EDGE_AE) #if defined(__VCGLIB_EDGE_AE)
return zs[j]; return zs[j];
#elif defined(__VCGLIB_EDGE_SA) #elif defined(__VCGLIB_EDGE_SA)
return zs[j]; return zs[j];
#else #else
assert(0); assert(0);
return *(char *)&_flags; static char dummy = 0;
return dummy;
#endif #endif
} }
inline const char & UberZ( const int j ) const inline const char & UberZ( const int j ) const
{ {
assert(j>=0); assert(j>=0 & j<2);
j<2);
#if defined(__VCGLIB_EDGE_AE) #if defined(__VCGLIB_EDGE_AE)
return zs[j]; return zs[j];
#elif defined(__VCGLIB_EDGE_SA) #elif defined(__VCGLIB_EDGE_SA)
return zs[j]; return zs[j];
#else #else
assert(0); assert(0);
return *(char *)&_flags; static int dummy = 0;
return dummy;
#endif #endif
} }
@ -464,30 +468,30 @@ public:
inline char & VEi( const int j ) inline char & VEi( const int j )
{ {
assert( !IsD() ); assert( !IsD() );
assert(j>=0); assert(j>=0 & j<2);
j<2);
#ifdef __VCGLIB_EDGE_VA #ifdef __VCGLIB_EDGE_VA
return zv[j]; return zv[j];
#elif defined(__VCGLIB_EDGE_SA) #elif defined(__VCGLIB_EDGE_SA)
return zs[j]; return zs[j];
#else #else
assert(0); assert(0);
return *(char *)&_flags; static char dummy = 0;
return dummy;
#endif #endif
} }
inline const char & VEi( const int j ) const inline const char & VEi( const int j ) const
{ {
assert( !IsD() ); assert( !IsD() );
assert(j>=0); assert(j>=0 & j<2);
j<2);
#ifdef __VCGLIB_EDGE_VA #ifdef __VCGLIB_EDGE_VA
return zv[j]; return zv[j];
#elif defined(__VCGLIB_EDGE_SA) #elif defined(__VCGLIB_EDGE_SA)
return zs[j]; return zs[j];
#else #else
assert(0); assert(0);
return *(char *)&_flags; static char dummy = 0;
return dummy;
#endif #endif
} }
@ -521,8 +525,13 @@ public:
inline const int & IMark() const inline const int & IMark() const
{ {
assert( !IsD() ); assert( !IsD() );
#ifdef __VCGLIB_EDGE_EM
assert( (_flags & NOTREAD) == 0 ); assert( (_flags & NOTREAD) == 0 );
return imark; return imark;
#else
static int dummy = 0;
return dummy;
#endif
} }
/// Initialize the imark system of the face /// Initialize the imark system of the face