From d399094a168f3385db25fe25ad7e26a37bdc7b4b Mon Sep 17 00:00:00 2001 From: cnr-isti-vclab Date: Mon, 4 Jun 2007 15:40:22 +0000 Subject: [PATCH] Add vertex-tetrahedron adjacency component VTAdj. --- vcg/simplex/vertexplus/component.h | 31 ++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/vcg/simplex/vertexplus/component.h b/vcg/simplex/vertexplus/component.h index 91fa754f..2ca5a82a 100644 --- a/vcg/simplex/vertexplus/component.h +++ b/vcg/simplex/vertexplus/component.h @@ -24,6 +24,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.22 2007/03/12 15:37:21 tarini +Texture coord name change! "TCoord" and "Texture" are BAD. "TexCoord" is GOOD. + Revision 1.21 2007/02/18 07:41:32 cignoni Corrected small syntax errors detected by gcc @@ -346,6 +349,34 @@ private: int _zp ; }; +/*----------------------------- VTADJ ------------------------------*/ + + +template class EmptyVTAdj: public T { +public: + typename T::TetraPointer &VTp() { static typename T::TetraPointer tp = 0; assert(0); return tp; } + typename T::TetraPointer cVTp() { static typename T::TetraPointer tp = 0; assert(0); return tp; } + int &VTi() { static int z = 0; return z; }; + static bool HasVTAdjacency() { return false; } + static bool HasVTAdjacencyOcc() { return false; } + static void Name( std::vector< std::string > & name ) { T::Name(name); } +}; + +template class VTAdj: public T { +public: + VTAdj() { _tp = 0; } + typename T::TetraPointer &VTp() { return _tp; } + typename T::TetraPointer cVTp() { return _tp; } + int &VTi() {return _zp; } + static bool HasVTAdjacency() { return true; } + static bool HasVTAdjacencyOcc() { return true; } + static void Name( std::vector< std::string > & name ) { name.push_back( std::string("VTAdj") ); T::Name(name); } + +private: + typename T::TetraPointer _tp ; + int _zp ; +}; + } // end namespace vert }// end namespace vcg #endif