From cb547de5ec95165521d71bc706230d929142e6d0 Mon Sep 17 00:00:00 2001 From: ganovelli Date: Wed, 26 Nov 2008 17:42:55 +0000 Subject: [PATCH] removed a few bugs, added EmptyHEData class --- vcg/simplex/edgeplus/component.h | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/vcg/simplex/edgeplus/component.h b/vcg/simplex/edgeplus/component.h index b75143ba..0d8cdf01 100644 --- a/vcg/simplex/edgeplus/component.h +++ b/vcg/simplex/edgeplus/component.h @@ -228,8 +228,8 @@ public: static void Name(std::vector & name){name.push_back(std::st /*----------------------------- EVADJ ------------------------------*/ template class EmptyEVAdj: public T { public: - typename T::EdgePointer &EVp() { static typename T::EdgePointer ep=0; assert(0); return ep; } - typename T::EdgePointer cEVp() { static typename T::EdgePointer ep=0; assert(0); return ep; } + typename T::VertexPointer &V(const int &) { static typename T::VertexPointer ep=0; assert(0); return ep; } + typename T::VertexPointer cV(const int &) { static typename T::VertexPointer ep=0; assert(0); return ep; } int &EVi(){static int z=0; return z;}; template < class LeftV> void ImportLocal(const LeftV & left ) { T::ImportLocal( left); } @@ -256,8 +256,8 @@ private: /*----------------------------- HEVADJ ------------------------------*/ template class EmptyHEVAdj: public T { public: - typename T::EdgePointer &HEVp() { static typename T::EdgePointer ep=0; assert(0); return ep; } - typename T::EdgePointer cHEVp() { static typename T::EdgePointer ep=0; assert(0); return ep; } + typename T::VertexPointer &HEVp() { static typename T::VertexPointer ep=0; assert(0); return ep; } + typename T::VertexPointer cHEVp() { static typename T::VertexPointer ep=0; assert(0); return ep; } int &EVi(){static int z=0; return z;}; template < class LeftV> void ImportLocal(const LeftV & left ) { T::ImportLocal( left); } @@ -306,9 +306,6 @@ public: static bool HasEEAdjacencyOcc() { return true; } static void Name(std::vector & name){name.push_back(std::string("EEAdj"));T::Name(name);} - typename T::EdgePointer &HENp() { return _ep[1]; } - typename T::EdgePointer &HEPp() { return _ep[0]; } - private: typename T::EdgePointer _ep[2] ; int _zp[2] ; @@ -401,8 +398,8 @@ private: /*----------------------------- HEPrevADJ ------------------------------*/ template class EmptyHEPrevAdj: public T { public: - typename T::EdgePointer &HENp(const int & i ) { static typename T::EdgePointer ep=0; assert(0); return ep; } - typename T::EdgePointer cHEp(const int & i) { static typename T::EdgePointer ep=0; assert(0); return ep; } + typename T::EdgePointer &HEPp() { static typename T::EdgePointer ep=0; assert(0); return ep; } + typename T::EdgePointer cHPp() { static typename T::EdgePointer ep=0; assert(0); return ep; } int &EEi(){static int z=0; return z;}; template < class LeftV> void ImportLocal(const LeftV & left ) { T::ImportLocal( left); } @@ -461,6 +458,15 @@ private: /** HEdgeData keep all the data for the half edge */ +template +class EmptyHEdgeData : public EmptyEFAdj< // pointer to the face + EmptyHEOppAdj < // pointer to the opposite half edge + EmptyHENextAdj < // pointer to the next half edge along the face + EmptyHEVAdj < // pointer to the vertex + EmptyHEPrevAdj< + T > > > > >{}; + + template class HEdgeData : public EFAdj< // pointer to the face HEOppAdj < // pointer to the opposite half edge