diff --git a/vcg/simplex/face/base.h b/vcg/simplex/face/base.h index 15f5e297..3f7078be 100644 --- a/vcg/simplex/face/base.h +++ b/vcg/simplex/face/base.h @@ -24,6 +24,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.21 2004/10/18 17:13:50 ganovelli +added ::IsBorder + Revision 1.20 2004/09/15 11:20:15 ganovelli changed P() to cP() @@ -537,27 +540,45 @@ public: #endif } + inline const FFTYPE * FFp( const int j ) const + { + assert( (_flags & DELETED) == 0 ); + assert( (_flags & NOTREAD) == 0 ); + assert(j>=0 && j<3); + +#if defined(__VCGLIB_FACE_AF) + return _ffp[j]; +#elif defined(__VCGLIB_FACE_AS) + return fs[j]; +#else + assert(0); + static FFTYPE *dum=0; dum+=j; + return dum; +#endif + } + + inline FFTYPE * & FFp1( const int j ) { return FFp((j+1)%3);} + inline FFTYPE * & FFp2( const int j ) { return FFp((j+2)%3);} + inline const FFTYPE * const& FFp1( const int j ) const { return FFp((j+1)%3);} + inline const FFTYPE * const& FFp2( const int j ) const { return FFp((j+2)%3);} + + inline bool const IsBorder( const int & j ) const { assert( (_flags & DELETED) == 0 ); assert( (_flags & NOTREAD) == 0 ); assert(j>=0); - assert(j<3); + assert(j<3); #if defined(__VCGLIB_FACE_AF) - return (_ffp[j]==this); + return (_ffp[j]==this); #elif defined(__VCGLIB_FACE_AS) - return (fs[j]==this); + return (fs[j]==this); #else - assert(0); - return (FFTYPE *)this; + assert(0); + return (FFTYPE *)this; #endif } - inline FFTYPE * & F1( const int j ) { return F((j+1)%3);} - inline FFTYPE * & F2( const int j ) { return F((j+2)%3);} - inline const FFTYPE * const& F1( const int j ) const { return F((j+1)%3);} - inline const FFTYPE * const& F2( const int j ) const { return F((j+2)%3);} - /** Return the pointer to the j-th adjacent face. @param j Index of the edge.