From 8a1fdbe37fd848e6e70d78e4c1d342719a08a5a2 Mon Sep 17 00:00:00 2001 From: ganovelli Date: Fri, 19 Dec 2008 10:34:41 +0000 Subject: [PATCH] [SIMPLEXplus promotion] This modification removes the old way to define simplexes (already deprecated and unsupported). In the following SIMPLEX = [vertex|edge|face|tetrahedron] All the stuff that was in vcg/simplex/SIMPLEXplus/ has now been promoted to vcg/simplex/ Details: - the folder vcg/simplex/SIMPLEX/with has been removed - the file vcg/simplex/SIMPLEX/base.h has been renamed into vcg/simplex/SIMPLEX/base_old.h - the content of vcg/simplex/SIMPLEXplus/ has been moved into vcg/simplex/SIMPLEX/ - the folder vcg/simplex/SIMPLEXplus/ has been removed Actions the update the code using vcglib: replace with in every include for MESHLAB users: already done along with this commit --- vcg/simplex/vertexplus/base.h | 292 ----------- vcg/simplex/vertexplus/component.h | 610 ----------------------- vcg/simplex/vertexplus/component_occ.h | 268 ---------- vcg/simplex/vertexplus/component_ocf.h | 645 ------------------------- vcg/simplex/vertexplus/component_sph.h | 58 --- vcg/simplex/vertexplus/with/afvcvnvq.h | 9 - vcg/simplex/vertexplus/with/afvn.h | 11 - vcg/simplex/vertexplus/with/readme.txt | 53 -- vcg/simplex/vertexplus/with/vcvn.h | 12 - vcg/simplex/vertexplus/with/vn.h | 13 - 10 files changed, 1971 deletions(-) delete mode 100644 vcg/simplex/vertexplus/base.h delete mode 100644 vcg/simplex/vertexplus/component.h delete mode 100644 vcg/simplex/vertexplus/component_occ.h delete mode 100644 vcg/simplex/vertexplus/component_ocf.h delete mode 100644 vcg/simplex/vertexplus/component_sph.h delete mode 100644 vcg/simplex/vertexplus/with/afvcvnvq.h delete mode 100644 vcg/simplex/vertexplus/with/afvn.h delete mode 100644 vcg/simplex/vertexplus/with/readme.txt delete mode 100644 vcg/simplex/vertexplus/with/vcvn.h delete mode 100644 vcg/simplex/vertexplus/with/vn.h diff --git a/vcg/simplex/vertexplus/base.h b/vcg/simplex/vertexplus/base.h deleted file mode 100644 index c1355a09..00000000 --- a/vcg/simplex/vertexplus/base.h +++ /dev/null @@ -1,292 +0,0 @@ -/**************************************************************************** -* VCGLib o o * -* Visual and Computer Graphics Library o o * -* _ O _ * -* Copyright(C) 2004 \/)\/ * -* Visual Computing Lab /\/| * -* ISTI - Italian National Research Council | * -* \ * -* All rights reserved. * -* * -* This program is free software; you can redistribute it and/or modify * -* it under the terms of the GNU General Public License as published by * -* the Free Software Foundation; either version 2 of the License, or * -* (at your option) any later version. * -* * -* This program is distributed in the hope that it will be useful, * -* but WITHOUT ANY WARRANTY; without even the implied warranty of * -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -* GNU General Public License (http://www.gnu.org/licenses/gpl.txt) * -* for more details. * -* * -****************************************************************************/ -/**************************************************************************** - History - -$Log: not supported by cvs2svn $ -Revision 1.12 2008/03/17 11:39:14 ganovelli -added curvature and curvatruredir (compiled .net 2005 and gcc) - -Revision 1.11 2008/02/04 21:26:49 ganovelli -added ImportLocal which imports all local attributes into vertexplus and faceplus. -A local attribute is everything (N(), C(), Q()....) except pointers to other simplices -(i.e. FFAdj, VFAdj, VertexRef) which are set to NULL. -Added some function for const attributes - -Revision 1.10 2007/03/12 15:37:21 tarini -Texture coord name change! "TCoord" and "Texture" are BAD. "TexCoord" is GOOD. - -Revision 1.9 2007/02/12 19:00:56 ganovelli -added Name(std:vector& n) that fills n with the names of the attribute of the vertex type - -Revision 1.8 2006/09/28 17:34:11 cignoni -Added Missing GetBBox function - -Revision 1.7 2006/02/27 17:42:43 ponchio -Added some documentation. - -Revision 1.6 2005/12/05 15:58:10 cignoni -Removed spurious definition of flags in Aritymax that was overriding the correct definition in EmplyBitFlags and BitFlags classes - -Revision 1.5 2005/12/02 00:44:41 cignoni -Reformatted and compacted flags code. - -Revision 1.4 2005/11/16 22:59:35 cignoni -Standardized name of flags. It is plural becouse each simplex has many flag. - -Revision 1.3 2005/11/12 18:36:51 cignoni -Added 'Visited' flag functions - -Revision 1.2 2004/04/03 13:33:55 cignoni -Missing include - -Revision 1.1 2004/03/29 08:36:26 cignoni -First working version! - - -****************************************************************************/ -#ifndef __VCG_VERTEX_PLUS -#define __VCG_VERTEX_PLUS - -//#include -#include -#include -#include -#include - -namespace vcg { - -/*------------------------------------------------------------------*/ -/* -The base class of all the recusive definition chain. It is just a container of the typenames of the various simplexes. -These typenames must be known form all the derived classes. -*/ - -template -class VertexTypeHolder{ - public: - typedef BVT VertType; - typedef BET EdgeType; - typedef BFT FaceType; - typedef BTT TetraType; - typedef BVT *VertPointer; - typedef BET *EdgePointer; - typedef BFT *FacePointer; - typedef BTT *TetraPointer; - template < class LeftV> - void ImportLocal(const LeftV & /* left */ ) { } - static void Name(std::vector & name){} - -}; - -/* The base class form which we start to add our components. -it has the empty definition for all the standard members (coords, color flags) -Note: -in order to avoid both virtual classes and ambiguous definitions all -the subsequent overrides must be done in a sequence of derivation. - -In other words we cannot derive and add in a single derivation step -(with multiple ancestor), both the real (non-empty) normal and color but -we have to build the type a step a time (deriving from a single ancestor at a time). - - -*/ -template -class VertexBase: public vertex::EmptyTexCoord< - vertex::EmptyVFAdj< - vertex::EmptyVEAdj< - vertex::EmptyColorQuality< - vertex::EmptyBitFlags< - vertex::EmptyCoordNormal< - vertex::EmptyCurvatureData< - vertex::EmptyRadius< - VertexTypeHolder > > > > > > > >{ -}; - - -/* The Real Big Vertex class; - -The class __VertexArityMax__ is the one that is the Last to be derived, -and therefore is the only one to know the real members -(after the many overrides) so all the functions with common behaviour -using the members defined in the various Empty/nonEmpty component classes -MUST be defined here. - -I.e. IsD() that uses the overridden Flags() member must be defined here. - -*/ - -template class A, template class B, - template class C, template class D, - template class E, template class F, - template class G, template class H, - template class I, template class J, - template class K, template class L> -class VertexArityMax: public Arity12 { - -// ----- Flags stuff ----- -public: - - - enum { - - DELETED = 0x0001, // This bit indicate that the vertex is deleted from the mesh - NOTREAD = 0x0002, // This bit indicate that the vertex of the mesh is not readable - NOTWRITE = 0x0004, // This bit indicate that the vertex is not modifiable - MODIFIED = 0x0008, // This bit indicate that the vertex is modified - VISITED = 0x0010, // This bit can be used to mark the visited vertex - SELECTED = 0x0020, // This bit can be used to select - BORDER = 0x0100, // Border Flag - USER0 = 0x0200 // First user bit - }; - - inline int & UberFlags () { return this->Flags(); } - inline const int UberFlags() const { return this->Flags(); } - - bool IsD() const {return (this->Flags() & DELETED) != 0;} /// checks if the vertex is deleted - bool IsR() const {return (this->Flags() & NOTREAD) == 0;} /// checks if the vertex is readable - bool IsW() const {return (this->Flags() & NOTWRITE)== 0;}/// checks if the vertex is modifiable - bool IsRW() const {return (this->Flags() & (NOTREAD | NOTWRITE)) == 0;}/// This funcion checks whether the vertex is both readable and modifiable - bool IsS() const {return (this->Flags() & SELECTED) != 0;}/// checks if the vertex is Selected - bool IsB() const {return (this->Flags() & BORDER) != 0;}/// checks if the vertex is a border one - bool IsV() const {return (this->Flags() & VISITED) != 0;}/// checks if the vertex Has been visited - - - /** Set the flag value - @param flagp Valore da inserire nel flag - */ - void SetFlags(int flagp) {this->Flags()=flagp;} - - /** Set the flag value - @param flagp Valore da inserire nel flag - */ - void ClearFlags() {this->Flags()=0;} - void SetD() {this->Flags() |=DELETED;}/// deletes the vertex from the mesh - void ClearD() {this->Flags() &=(~DELETED);}/// un-delete a vertex - void SetR() {this->Flags() &=(~NOTREAD);}/// marks the vertex as readable - void ClearR() {this->Flags() |=NOTREAD;}/// marks the vertex as not readable - void ClearW() {this->Flags() |=NOTWRITE;}/// marks the vertex as writable - void SetW() {this->Flags() &=(~NOTWRITE);}/// marks the vertex as not writable - void SetS() {this->Flags() |=SELECTED;}/// select the vertex - void ClearS() {this->Flags() &= ~SELECTED;}/// Un-select a vertex - void SetB() {this->Flags() |=BORDER;} - void ClearB() {this->Flags() &=~BORDER;} - void SetV() {this->Flags() |=VISITED;} - void ClearV() {this->Flags() &=~VISITED;} - -/// Return the first bit that is not still used -static int &LastBitFlag() - { - static int b =USER0; - return b; - } - -/// allocate a bit among the flags that can be used by user. -static inline int NewBitFlag() - { - LastBitFlag()=LastBitFlag()<<1; - return LastBitFlag(); - } -// de-allocate a bit among the flags that can be used by user. -static inline bool DeleteBitFlag(int bitval) - { - if(LastBitFlag()==bitval) { - LastBitFlag()= LastBitFlag()>>1; - return true; - } - assert(0); - return false; - } - /// This function checks if the given user bit is true - bool IsUserBit(int userBit){return (this->Flags() & userBit) != 0;} - /// This function set the given user bit - void SetUserBit(int userBit){this->Flags() |=userBit;} - /// This function clear the given user bit - void ClearUserBit(int userBit){this->Flags() &= (~userBit);} - - template - void GetBBox( BoxType & bb ) const - { bb.Set(this->P()); } - - }; - - -/* - -These are the three main classes that are used by the library user to define its own vertexes. -The user MUST specify the names of all the type involved in a generic complex. -so for example when defining a vertex of a trimesh you must know the name of the type of the edge and of the face. -Typical usage example: - -A vertex with coords, flags and normal for use in a standard trimesh: - -class VertexNf : public VertexSimp2< VertexNf, EdgeProto, FaceProto, vert::Coord3d, vert::Flag, vert::Normal3f > {}; - - -A vertex with coords, and normal for use in a tetrahedral mesh AND in a standard trimesh: - -class TetraVertex : public VertexSimp3< TetraVertex, EdgeProto, FaceProto, TetraProto, vert::Coord3d, vert::Normal3f > {}; - - -A summary of the available vertex attributes (see component.h for more details): - -Coord3f, Coord3d, -Normal3s, Normal3f, Normal3d -Mark //a int component (incremental mark) -BitFlags -TexCoord2s, TexCoord2f, TexCoord2d -Color4b -Qualitys, Qualityf, Qualityd -VFAdj //topology (vertex->face adjacency) -*/ - -template class A = DefaultDeriver, template class B = DefaultDeriver, - template class C = DefaultDeriver, template class D = DefaultDeriver, - template class E = DefaultDeriver, template class F = DefaultDeriver, - template class G = DefaultDeriver, template class H = DefaultDeriver, - template class I = DefaultDeriver, template class J = DefaultDeriver, - template class K = DefaultDeriver, template class L = DefaultDeriver> - class VertexSimp3: public VertexArityMax {}; - -template class A = DefaultDeriver, template class B = DefaultDeriver, - template class C = DefaultDeriver, template class D = DefaultDeriver, - template class E = DefaultDeriver, template class F = DefaultDeriver, - template class G = DefaultDeriver, template class H = DefaultDeriver, - template class I = DefaultDeriver, template class J = DefaultDeriver, - template class K = DefaultDeriver, template class L = DefaultDeriver> - class VertexSimp2: public VertexArityMax {}; - -template class A = DefaultDeriver, template class B = DefaultDeriver, - template class C = DefaultDeriver, template class D = DefaultDeriver, - template class E = DefaultDeriver, template class F = DefaultDeriver, - template class G = DefaultDeriver, template class H = DefaultDeriver, - template class I = DefaultDeriver, template class J = DefaultDeriver, - template class K = DefaultDeriver, template class L = DefaultDeriver> - class VertexSimp1: public VertexArityMax {}; - -}// end namespace -#endif diff --git a/vcg/simplex/vertexplus/component.h b/vcg/simplex/vertexplus/component.h deleted file mode 100644 index fb619c25..00000000 --- a/vcg/simplex/vertexplus/component.h +++ /dev/null @@ -1,610 +0,0 @@ -/**************************************************************************** -* VCGLib o o * -* Visual and Computer Graphics Library o o * -* _ O _ * -* Copyright(C) 2004 \/)\/ * -* Visual Computing Lab /\/| * -* ISTI - Italian National Research Council | * -* \ * -* All rights reserved. * -* * -* This program is free software; you can redistribute it and/or modify * -* it under the terms of the GNU General Public License as published by * -* the Free Software Foundation; either version 2 of the License, or * -* (at your option) any later version. * -* * -* This program is distributed in the hope that it will be useful, * -* but WITHOUT ANY WARRANTY; without even the implied warranty of * -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -* GNU General Public License (http://www.gnu.org/licenses/gpl.txt) * -* for more details. * -* * -****************************************************************************/ -/**************************************************************************** - History - -$Log: not supported by cvs2svn $ -Revision 1.27 2008/04/03 23:12:28 cignoni -compacted two pair of empty components to shorten derivation chains - -Revision 1.26 2008/03/17 11:39:14 ganovelli -added curvature and curvatruredir (compiled .net 2005 and gcc) - -Revision 1.25 2008/02/05 10:11:34 cignoni -A small typo (a T:: instead of TT::) - -Revision 1.24 2008/02/04 21:26:49 ganovelli -added ImportLocal which imports all local attributes into vertexplus and faceplus. -A local attribute is everything (N(), C(), Q()....) except pointers to other simplices -(i.e. FFAdj, VFAdj, VertexRef) which are set to NULL. -Added some function for const attributes - -Revision 1.23 2007/06/04 15:40:22 turini -Add vertex-tetrahedron adjacency component VTAdj. - -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 - -Revision 1.20 2007/02/12 19:00:56 ganovelli -added Name(std:vector& n) that fills n with the names of the attribute of the vertex type - -Revision 1.19 2006/12/11 23:40:57 ganovelli -Has*Opt migrated to Has*Occ - -Revision 1.18 2006/11/28 22:34:28 cignoni -Added default constructor with null initialization to adjacency members. -AddFaces and AddVertices NEED to know if the topology is correctly computed to update it. - -Revision 1.17 2006/01/09 13:58:56 cignoni -Added Initialization of Color in Vertex and Face Components - -Revision 1.16 2005/11/22 23:58:03 cignoni -Added intiailization of flags to zero in the constructor, - -Revision 1.15 2005/11/18 15:44:51 cignoni -Access to constant normal changed from by val to by reference - -Revision 1.14 2005/11/16 23:02:37 cignoni -Added some missing members to EmptyMark -Standardized name of flags. It is plural becouse each simplex has many flag. - -Revision 1.13 2005/11/14 23:50:57 cignoni -Added Incremental Mark - -Revision 1.12 2005/11/12 18:35:49 cignoni -Changed HasFlag -> HasFlags - -Revision 1.11 2005/11/01 18:17:52 cignoni -Added an assert(0) in all the accesses to empty components - -Revision 1.10 2005/10/15 16:24:10 ganovelli -Working release (compilata solo su MSVC), component_occ � migrato da component_opt - -Revision 1.9 2005/10/14 13:30:07 cignoni -Added constant access functions and reflective functions (HasSomething stuff) -to all the components This is the first really working version... - -Revision 1.8 2005/10/07 15:19:54 cignoni -minor updates to keep it in line with the rest of the library - -Revision 1.7 2004/05/10 13:50:32 cignoni -Updated names of adj functions to the new standards - -Revision 1.6 2004/04/05 11:53:06 cignoni -addend constant access funcs - -Revision 1.5 2004/04/03 13:35:51 cignoni -minor changes - -Revision 1.4 2004/03/31 13:15:28 cignoni -Added optional cpmponent - -Revision 1.3 2004/03/31 12:28:37 ganovelli -*** empty log message *** - -Revision 1.2 2004/03/29 14:26:38 cignoni -Error in color - -Revision 1.1 2004/03/29 08:36:26 cignoni -First working version! - - -****************************************************************************/ -#ifndef __VCG_VERTEX_PLUS_COMPONENT -#define __VCG_VERTEX_PLUS_COMPONENT -#include -#include -#include -#include -#include - -namespace vcg { - namespace vertex { -/* -Some naming Rules -All the Components that can be added to a vertex should be defined in the namespace vert: - -*/ - -/*------------------------- EMPTY COORD & NORMAL -----------------------------------------*/ -template class EmptyCoordNormal: public T { -public: - typedef vcg::Point3f CoordType; - typedef CoordType::ScalarType ScalarType; - - CoordType &P() { static CoordType coord(0, 0, 0); return coord; } - const CoordType &P() const { static CoordType coord(0, 0, 0); assert(0); return coord; } - const CoordType &cP() const { static CoordType coord(0, 0, 0); assert(0); return coord; } - CoordType &UberP() { static CoordType coord(0, 0, 0); return coord; } - static bool HasCoord() { return false; } - - typedef vcg::Point3s NormalType; - NormalType &N() { static NormalType dummy_normal(0, 0, 0); assert(0); return dummy_normal; } - const NormalType cN()const { static NormalType dummy_normal(0, 0, 0); assert(0); return dummy_normal; } - static bool HasNormal() { return false; } - static bool HasNormalOcc() { return false; } - template < class LeftV> - void ImportLocal(const LeftV & left ) { T::ImportLocal( left); } - static void Name(std::vector & name){T::Name(name);} -}; - -/*-------------------------- COORD ----------------------------------------*/ - -template class Coord: public T { -public: - typedef A CoordType; - typedef typename CoordType::ScalarType ScalarType; - CoordType &P() { return _coord; } - const CoordType &P() const { return _coord; } - const CoordType &cP() const { return _coord; } - CoordType &UberP() { return _coord; } - - template < class LeftV> - void ImportLocal(const LeftV & left ) { P().Import(left.cP()); T::ImportLocal( left); } - static bool HasCoord() { return true; } - static void Name(std::vector & name){name.push_back(std::string("Coord"));T::Name(name);} - -private: - CoordType _coord; -}; -template class Coord3f: public Coord { -public: static void Name(std::vector & name){name.push_back(std::string("Coord3f"));T::Name(name);} -}; -template class Coord3d: public Coord { -public: static void Name(std::vector & name){name.push_back(std::string("Coord3d"));T::Name(name);} -}; - -/*-------------------------- NORMAL ----------------------------------------*/ - -template class Normal: public T { -public: - typedef A NormalType; - NormalType &N() { return _norm; } - const NormalType &cN() const { return _norm; } - template < class LeftV> - void ImportLocal(const LeftV & left ) { N() = left.cN(); T::ImportLocal( left); } - static bool HasNormal() { return true; } - static void Name(std::vector & name){name.push_back(std::string("Normal"));T::Name(name);} - -private: - NormalType _norm; -}; - -template class Normal3s: public Normal { -public:static void Name(std::vector & name){name.push_back(std::string("Normal3s"));T::Name(name);} -}; -template class Normal3f: public Normal { -public: static void Name(std::vector & name){name.push_back(std::string("Normal3f"));T::Name(name);} -}; -template class Normal3d: public Normal { -public: static void Name(std::vector & name){name.push_back(std::string("Normal3d"));T::Name(name);} -}; - - -/*-------------------------- INCREMENTAL MARK ----------------------------------------*/ - -template class EmptyMark: public T { -public: - static bool HasMark() { return false; } - static bool HasMarkOcc() { return false; } - inline void InitIMark() { } - inline int & IMark() { assert(0); static int tmp=-1; return tmp;} - inline const int & IMark() const {return 0;} - template < class LeftV> - void ImportLocal(const LeftV & left ) { T::ImportLocal( left); } - static void Name(std::vector & name){T::Name(name);} - -}; -template class Mark: public T { -public: - static bool HasMark() { return true; } - static bool HasMarkOcc() { return true; } - inline void InitIMark() { _imark = 0; } - inline int & IMark() { return _imark;} - inline const int & IMark() const {return _imark;} - template < class LeftV> - void ImportLocal(const LeftV & left ) { IMark() = left.IMark(); T::ImportLocal( left); } - static void Name(std::vector & name){name.push_back(std::string("Mark"));T::Name(name);} - - private: - int _imark; -}; - -/*-------------------------- TEXCOORD ----------------------------------------*/ - -template class EmptyTexCoord: public TT { -public: - typedef vcg::TexCoord2 TexCoordType; - TexCoordType &T() { static TexCoordType dummy_texcoord; assert(0); return dummy_texcoord; } - template < class LeftV> - void ImportLocal(const LeftV & left ) { TT::ImportLocal( left); } - static bool HasTexCoord() { return false; } - static void Name(std::vector & name){TT::Name(name);} - - }; -template class TexCoord: public TT { -public: - typedef A TexCoordType; - TexCoordType &T() { return _t; } - const TexCoordType &cT() const { return _t; } - template < class LeftV> - void ImportLocal(const LeftV & left ) { T() = left.cT(); TT::ImportLocal( left); } - static bool HasTexCoord() { return true; } - static void Name(std::vector & name){name.push_back(std::string("TexCoord"));TT::Name(name);} - -private: - TexCoordType _t; -}; - -template class TexCoord2s: public TexCoord, TT> { - static void Name(std::vector & name){name.push_back(std::string("TexCoord2s"));TT::Name(name);} - -}; -template class TexCoord2f: public TexCoord, TT> { - static void Name(std::vector & name){name.push_back(std::string("TexCoord2f"));TT::Name(name);} -}; -template class TexCoord2d: public TexCoord, TT> { - static void Name(std::vector & name){name.push_back(std::string("TexCoord2d"));TT::Name(name);} -}; - -/*------------------------- FLAGS -----------------------------------------*/ -template class EmptyBitFlags: public T { -public: - typedef int FlagType; - /// Return the vector of Flags(), senza effettuare controlli sui bit - int &Flags() { static int dummyflags(0); assert(0); return dummyflags; } - const int Flags() const { return 0; } - template < class LeftV> - void ImportLocal(const LeftV & left ) { T::ImportLocal( left); } - static bool HasFlags() { return false; } - static void Name(std::vector & name){T::Name(name);} - -}; - -template class BitFlags: public T { -public: - BitFlags(){_flags=0;} - typedef int FlagType; - int &Flags() {return _flags; } - const int Flags() const {return _flags; } - template < class LeftV> - void ImportLocal(const LeftV & left ) { Flags() = left.Flags(); T::ImportLocal( left); } - static bool HasFlags() { return true; } - static void Name(std::vector & name){name.push_back(std::string("BitFlags"));T::Name(name);} - -private: - int _flags; -}; - -/*-------------------------- EMPTY COLOR & QUALITY ----------------------------------*/ - -template class EmptyColorQuality: public T { -public: - typedef float QualityType; - QualityType &Q() { static QualityType dummyQuality(0); assert(0); return dummyQuality; } - static bool HasQuality() { return false; } - - typedef vcg::Color4b ColorType; - ColorType &C() { static ColorType dumcolor(vcg::Color4b::White); assert(0); return dumcolor; } - const ColorType &cC() const { static ColorType dumcolor(vcg::Color4b::White); assert(0); return dumcolor; } - -template < class LeftV> - void ImportLocal(const LeftV & left ) { T::ImportLocal( left); } - static bool HasColor() { return false; } - static void Name(std::vector & name){T::Name(name);} -}; - -/*-------------------------- Color ----------------------------------*/ - -template class Color: public T { -public: - Color():_color(vcg::Color4b::White) {} - typedef A ColorType; - ColorType &C() { return _color; } - const ColorType &C() const { return _color; } - const ColorType &cC() const { return _color; } - template < class LeftV> - void ImportLocal(const LeftV & left ) { C() = left.cC(); T::ImportLocal( left); } - static bool HasColor() { return true; } - static void Name(std::vector & name){name.push_back(std::string("Color"));T::Name(name);} - -private: - ColorType _color; -}; - -template class Color4b: public Color { - public: static void Name(std::vector & name){name.push_back(std::string("Color4b"));TT::Name(name);} -}; - -/*-------------------------- Quality ----------------------------------*/ - -template class Quality: public TT { -public: - typedef A QualityType; - QualityType &Q() { return _quality; } - const QualityType & cQ() const {return _quality; } - template < class LeftV> - void ImportLocal(const LeftV & left ) { Q() = left.cQ(); TT::ImportLocal( left); } - static bool HasQuality() { return true; } - static void Name(std::vector & name){name.push_back(std::string("Quality"));TT::Name(name);} - -private: - QualityType _quality; -}; - -template class Qualitys: public Quality { -public: static void Name(std::vector & name){name.push_back(std::string("Qualitys"));TT::Name(name);} -}; -template class Qualityf: public Quality { -public: static void Name(std::vector & name){name.push_back(std::string("Qualityf"));TT::Name(name);} -}; -template class Qualityd: public Quality { -public: static void Name(std::vector & name){name.push_back(std::string("Qualityd"));TT::Name(name);} -}; - - - -template class EmptyCurvatureData:public TT { -public: - - typedef float ScalarType; - typedef Point3f VecType; - float &Kh() {static float dummy = 0.f; assert(0);return dummy;;} - float &Kg() { static float dummy = 0.f; assert(0);return dummy;} - const float &cKh() const {static float dummy = 0.f; assert(0);return dummy;;} - const float &cKg()const { static float dummy = 0.f;assert(0); return dummy;} - - VecType &PD1(){static VecType v(0,0,0); assert(0);return v;} - VecType &PD2(){static VecType v(0,0,0); assert(0);return v;} - const VecType &cPD1() const {static VecType v(0,0,0); assert(0);return v;} - const VecType &cPD2() const {static VecType v(0,0,0); assert(0);return v;} - - ScalarType &K1(){ static ScalarType v = 0.0;assert(0);return v;} - ScalarType &K2(){ static ScalarType v = 0.0;assert(0);return v;} - const ScalarType &cK1() const {static ScalarType v = 0.0;assert(0);return v;} - const ScalarType &cK2()const {static ScalarType v = 0.0;assert(0);return v;} - - static bool HasCurvatureOcc() { return false; } - static bool HasCurvatureOcf() { return false; } - static bool HasCurvature() { return false; } - static bool HasCurvatureDir() { return false; } - static void Name(std::vector & name){TT::Name(name);} -}; - -/*-------------------------- Curvature ----------------------------------*/ - -template class EmptyCurvature: public TT { -public: - typedef vcg::Point2 CurvatureType; - - float &Kh() {static float dummy = 0.f; return dummy;;} - float &Kg() { static float dummy = 0.f; return dummy;} - const float &cKh() const {static float dummy = 0.f; return dummy;;} - const float &cKg()const { static float dummy = 0.f; return dummy;} - - static bool HasCurvatureOcc() { return false; } - static bool HasCurvatureOcf() { return false; } - static bool HasCurvature() { return false; } - static void Name(std::vector & name){TT::Name(name);} -}; - -template class Curvature: public TT { -public: - typedef Point2 CurvatureType; - typedef typename CurvatureType::ScalarType ScalarType; - ScalarType &Kh(){ return _hk[0];} - ScalarType &Kg(){ return _hk[1];} - const ScalarType &cKh() const { return _hk[0];} - const ScalarType &cKg() const { return _hk[1];} - - static bool HasCurvature() { return true; } - static void Name(std::vector & name){name.push_back(std::string("Curvature"));TT::Name(name);} - -private: - Point2 _hk; -}; - - -template class Curvaturef: public Curvature< float, T> { -public: static void Name(std::vector & name){name.push_back(std::string("Curvaturef"));T::Name(name);} -}; -template class Curvatured: public Curvature { -public: static void Name(std::vector & name){name.push_back(std::string("Curvatured"));T::Name(name);} -}; - -/*-------------------------- Curvature Direction ----------------------------------*/ - -template -struct CurvatureDirBaseType{ - typedef Point3 VecType; - typedef S ScalarType; - CurvatureDirBaseType () {} - Point3max_dir,min_dir; // max and min curvature direction - S k1,k2;// max and min curvature values -}; - -template class EmptyCurvatureDir: public TT { -public: - typedef CurvatureDirBaseType CurvatureDirType; - - Point3f &PD1(){static Point3f dummy(0,0,0); return dummy;} - Point3f &PD2(){static Point3f dummy(0,0,0); return dummy;} - const Point3f &cPD1() const {static Point3f dummy(0,0,0); return dummy;} - const Point3f &cPD2()const {static Point3f dummy(0,0,0); return dummy;} - - float &K1(){ static float dummy(0);assert(0);return dummy;} - float &K2(){ static float dummy(0);assert(0);return dummy;} - const float &cK1()const { static float dummy(0);assert(0);return dummy;} - const float &cK2()const { static float dummy(0);assert(0);return dummy;} - - static bool HasCurvatureDir() { return false; } - static void Name(std::vector & name){TT::Name(name);} -}; - -template class CurvatureDir: public TT { -public: - typedef A CurvatureDirType; - typedef typename CurvatureDirType::VecType VecType; - typedef typename CurvatureDirType::ScalarType ScalarType; - - VecType &PD1(){ return _curv.max_dir;} - VecType &PD2(){ return _curv.min_dir;} - const VecType &cPD1() const {return _curv.max_dir;} - const VecType &cPD2() const {return _curv.min_dir;} - - ScalarType &K1(){ return _curv.k1;} - ScalarType &K2(){ return _curv.k2;} - const ScalarType &cK1() const {return _curv.k1;} - const ScalarType &cK2()const {return _curv.k2;} - - static bool HasCurvatureDir() { return true; } - static void Name(std::vector & name){name.push_back(std::string("CurvatureDir"));TT::Name(name);} - -private: - CurvatureDirType _curv; -}; - - -template class CurvatureDirf: public CurvatureDir, T> { -public: static void Name(std::vector & name){name.push_back(std::string("CurvatureDirf"));T::Name(name);} -}; -template class CurvatureDird: public CurvatureDir, T> { -public: static void Name(std::vector & name){name.push_back(std::string("CurvatureDird"));T::Name(name);} -}; - -/*-------------------------- Empty Radius ----------------------------------*/ - -template class EmptyRadius: public T { -public: - - typedef float RadiusType; - typedef RadiusType ScalarType; - - RadiusType &R(){ static ScalarType v = 0.0; assert(0 && "the radius component is not available"); return v; } - const RadiusType &cR() const { static const ScalarType v = 0.0; assert(0 && "the radius component is not available"); return v; } - - static bool HasRadius() { return false; } - static bool HasRadiusOcf() { return false; } - static void Name(std::vector & name){ T::Name(name);} -}; - - - -/*----------------------------- VEADJ ------------------------------*/ - - -template class EmptyVEAdj: public T { -public: - typename T::EdgePointer &VEp() { static typename T::EdgePointer ep=0; assert(0); return ep; } - typename T::EdgePointer cVEp() { static typename T::EdgePointer ep=0; assert(0); return ep; } - int &VEi(){static int z=0; return z;}; - template < class LeftV> - void ImportLocal(const LeftV & left ) { T::ImportLocal( left); } - static bool HasVEAdjacency() { return false; } - static bool HasVEAdjacencyOcc() { return false; } - static void Name(std::vector & name){ T::Name(name);} -}; - -template class VEAdj: public T { -public: - VEAdj(){_ep=0;} - typename T::EdgePointer &VEp() {return _ep; } - typename T::EdgePointer cVEp() {return _ep; } - int &VEi() {return _zp; } - template < class LeftV> - void ImportLocal(const LeftV & left ) { VEp() = NULL; T::ImportLocal( left); } - static bool HasVEAdjacency() { return true; } - static bool HasVEAdjacencyOcc() { return true; } - static void Name(std::vector & name){name.push_back(std::string("VEAdj"));T::Name(name);} - -private: - typename T::EdgePointer _ep ; - int _zp ; -}; - -/*----------------------------- VFADJ ------------------------------*/ - - -template class EmptyVFAdj: public T { -public: - typename T::FacePointer &VFp() { static typename T::FacePointer fp=0; assert(0); return fp; } - typename T::FacePointer cVFp() { static typename T::FacePointer fp=0; assert(0); return fp; } - int &VFi(){static int z=0; return z;}; - template < class LeftV> - void ImportLocal(const LeftV & left ) { T::ImportLocal( left); } - static bool HasVFAdjacency() { return false; } - static bool HasVFAdjacencyOcc() { return false; } - static void Name(std::vector & name){ T::Name(name);} -}; - -template class VFAdj: public T { -public: - VFAdj(){_fp=0;} - typename T::FacePointer &VFp() {return _fp; } - typename T::FacePointer cVFp() {return _fp; } - int &VFi() {return _zp; } - template < class LeftV> - void ImportLocal(const LeftV & left ) { VFp() = NULL; T::ImportLocal( left); } - static bool HasVFAdjacency() { return true; } - static bool HasVFAdjacencyOcc() { return true; } - static void Name(std::vector & name){name.push_back(std::string("VFAdj"));T::Name(name);} - -private: - typename T::FacePointer _fp ; - 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 diff --git a/vcg/simplex/vertexplus/component_occ.h b/vcg/simplex/vertexplus/component_occ.h deleted file mode 100644 index a5e1e96a..00000000 --- a/vcg/simplex/vertexplus/component_occ.h +++ /dev/null @@ -1,268 +0,0 @@ -/**************************************************************************** -* VCGLib o o * -* Visual and Computer Graphics Library o o * -* _ O _ * -* Copyright(C) 2004 \/)\/ * -* Visual Computing Lab /\/| * -* ISTI - Italian National Research Council | * -* \ * -* All rights reserved. * -* * -* This program is free software; you can redistribute it and/or modify * -* it under the terms of the GNU General Public License as published by * -* the Free Software Foundation; either version 2 of the License, or * -* (at your option) any later version. * -* * -* This program is distributed in the hope that it will be useful, * -* but WITHOUT ANY WARRANTY; without even the implied warranty of * -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -* GNU General Public License (http://www.gnu.org/licenses/gpl.txt) * -* for more details. * -* * -****************************************************************************/ -/**************************************************************************** - History - -$Log: not supported by cvs2svn $ -Revision 1.2 2007/03/12 15:37:21 tarini -Texture coord name change! "TCoord" and "Texture" are BAD. "TexCoord" is GOOD. - -Revision 1.1 2005/10/15 16:24:10 ganovelli -Working release (compilata solo su MSVC), component_occ � migrato da component_opt - - - -****************************************************************************/ -#ifndef __VCG_VERTEX_PLUS_COMPONENT_OCC -#define __VCG_VERTEX_PLUS_COMPONENT_OCC - -#include -#include - - -namespace vcg { - namespace vertex { -/* -Some naming Rules -All the Components that can be added to a vertex should be defined in the namespace vert: - -*/ - -/*------------------------- COORD -----------------------------------------*/ - -template class CoordOcc: public T { -public: - typedef A CoordType; - typedef typename CoordType::ScalarType ScalarType; - typedef typename T::VertType VertType; - CoordType &P() { return CAT< vector_occ,CoordType>::Instance()->Get((VertType*)this); } - CoordType &UberP() { return CAT< vector_occ,CoordType>::Instance()->Get((VertType*)this); } -}; -template class Coord3fOcc: public CoordOcc {}; -template class Coord3dOcc: public CoordOcc {}; - - -/*-------------------------- NORMAL ----------------------------------------*/ - -template class NormalOcc: public T { -public: - typedef A NormalType; - typedef typename T::VertType VertType; - NormalType &N() {return CAT< vector_occ,NormalType>::Instance()->Get((VertType*)this); } -/*private: - NormalType _norm; */ -}; - -template class Normal3sOcc: public NormalOcc {}; -template class Normal3fOcc: public NormalOcc {}; -template class Normal3dOcc: public NormalOcc {}; - -/*-------------------------- TEXCOORD ----------------------------------------*/ - -template class TexCoordOcc: public TT { -public: - typedef A TexCoordType; - typedef typename TT::VertType VertType; - TexCoordType &T() {return CAT< vector_occ,TexCoordType>::Instance()->Get((VertType*)this); } - static bool HasTexCoord() { return true; } - static bool HasTexCoordOcc() { return true; } - -/* private: - TexCoordType _t; */ -}; - -template class TexCoord2sOcc: public TexCoordOcc, T> {}; -template class TexCoord2fOcc: public TexCoordOcc, T> {}; -template class TexCoord2dOcc: public TexCoordOcc, T> {}; - -///*------------------------- FLAGS -----------------------------------------*/ - -template class FlagOcc: public T { -public: - typedef typename T::VertType VertType; - int &Flags() {return CAT< vector_occ,int>::Instance()->Get((VertType*)this); } - const int Flags() const {return CAT< vector_occ,int>::Instance()->Get((VertType*)this); } - static bool HasFlags() {return true;} - static bool HasFlagsOcc() {return true;} - - -}; - -///*-------------------------- COLOR ----------------------------------*/ - -template class ColorOcc: public T { -public: - typedef A ColorType; - typedef typename T::VertType VertType; - ColorType &C() { return CAT< vector_occ,ColorType>::Instance()->Get((VertType*)this); } - static bool HasColor() { return true; } -/*private: - ColorType _color; */ -}; - -template class Color4bOcc: public ColorOcc {}; - -///*-------------------------- Quality ----------------------------------*/ - -template class QualityOcc: public T { -public: - typedef A QualityType; - typedef typename T::VertType VertType; - QualityType &Q() { return CAT< vector_occ,QualityType>::Instance()->Get((VertType*)this);} - static bool HasQuality() { return true; } - -/*private: - QualityType _quality; */ -}; - -template class QualitysOcc: public QualityOcc {}; -template class QualityfOcc: public QualityOcc {}; -template class QualitydOcc: public QualityOcc {}; -// - -///*-------------------------- Curvature ----------------------------------*/ - -template class CurvatureOcc: public TT { -public: - typedef Point2 CurvatureTypeOcc; - typedef typename TT::VertType VertType; - typedef typename CurvatureTypeOcc::ScalarType ScalarType; - - ScalarType &H(){ return CAT< vector_occ,CurvatureTypeOcc>::Instance()->Get((VertType*)this)[0];} - ScalarType &K(){ return CAT< vector_occ,CurvatureTypeOcc>::Instance()->Get((VertType*)this)[1];} - const ScalarType &cH() const { return CAT< vector_occ,CurvatureTypeOcc>::Instance()->Get((VertType*)this)[0];} - const ScalarType &cK() const { return CAT< vector_occ,CurvatureTypeOcc>::Instance()->Get((VertType*)this)[1];} - - template - void ImportLocal(const LeftV & leftV){ - CAT< vector_occ,CurvatureTypeOcc>::Instance()->Get((VertType*)this)[0] = leftV.cH(); - CAT< vector_occ,CurvatureTypeOcc>::Instance()->Get((VertType*)this)[1] = leftV.cK(); - TT::ImporLocal(leftV); - } - - static bool HasCurvature() { return true; } - static bool HasCurvatureOcc() { return true; } - static void Name(std::vector & name){name.push_back(std::string("CurvatureOcc"));TT::Name(name);} - -private: -}; - -template class CurvaturefOcc: public CurvatureOcc { - static void Name(std::vector & name){name.push_back(std::string("CurvaturefOcc"));T::Name(name);} -}; -template class CurvaturedOcc: public CurvatureOcc { - static void Name(std::vector & name){name.push_back(std::string("CurvaturedOcc"));T::Name(name);} -}; - - -/*-------------------------- Curvature Direction ----------------------------------*/ - -template -struct CurvatureDirTypeOcc{ - typedef Point3 VecType; - typedef S ScalarType; - CurvatureDirTypeOcc () {} - Point3max_dir,min_dir; // max and min curvature direction - S k1,k2;// max and min curvature values -}; - - -template class CurvatureDirOcc: public TT { -public: - typedef A CurvatureDirTypeOcc; - typedef typename CurvatureDirTypeOcc::VecType VecType; - typedef typename CurvatureDirTypeOcc::ScalarType ScalarType; - typedef typename TT::VertType VertType; - - VecType &PD1(){ return CAT< vector_occ,CurvatureDirTypeOcc>::Instance()->Get((VertType*)this).max_dir;} - VecType &PD2(){ return CAT< vector_occ,CurvatureDirTypeOcc>::Instance()->Get((VertType*)this).min_dir;} - const VecType &cPD1() const {return CAT< vector_occ,CurvatureDirTypeOcc>::Instance()->Get((VertType*)this).max_dir;} - const VecType &cPD2() const {return CAT< vector_occ,CurvatureDirTypeOcc>::Instance()->Get((VertType*)this).min_dir;} - - ScalarType &K1(){ return CAT< vector_occ,CurvatureDirTypeOcc>::Instance()->Get((VertType*)this).k1;} - ScalarType &K2(){ return CAT< vector_occ,CurvatureDirTypeOcc>::Instance()->Get((VertType*)this).k2;} - const ScalarType &cK1() const {return CAT< vector_occ,CurvatureDirTypeOcc>::Instance()->Get((VertType*)this).k1;} - const ScalarType &cK2()const {return CAT< vector_occ,CurvatureDirTypeOcc>::Instance()->Get((VertType*)this).k2;} - - static bool HasCurvatureDir() { return true; } - static bool HasCurvatureDirOcc() { return true; } - static void Name(std::vector & name){name.push_back(std::string("CurvatureDir"));TT::Name(name);} - -}; - - -template class CurvatureDirfOcc: public CurvatureDirOcc, T> { -public: static void Name(std::vector & name){name.push_back(std::string("CurvatureDirf"));T::Name(name);} -}; -template class CurvatureDirdOcc: public CurvatureDirOcc, T> { -public: static void Name(std::vector & name){name.push_back(std::string("CurvatureDird"));T::Name(name);} -}; - -/*-------------------------- RADIUS ----------------------------------*/ - -template class RadiusOcc: public TT { -public: - typedef A RadiusType; - typedef A ScalarType; - typedef typename TT::VertType VertType; - - RadiusType &R(){ return CAT< vector_occ,RadiusType>::Instance()->Get((VertType*)this);} - const RadiusType &cR() const { return CAT< vector_occ,RadiusType>::Instance()->Get((VertType*)this);} - - template - void ImportLocal(const LeftV & leftV){ - CAT< vector_occ,RadiusType>::Instance()->Get((VertType*)this) = leftV.cR(); - TT::ImporLocal(leftV); - } - - static bool HasRadius() { return true; } - static bool HasRadiusOcc() { return true; } - static void Name(std::vector & name){name.push_back(std::string("RadiusOcc"));TT::Name(name);} - -private: -}; - -template class RadiusfOcc: public RadiusOcc { - static void Name(std::vector & name){name.push_back(std::string("RadiusfOcc"));T::Name(name);} -}; -template class RadiusdOcc: public RadiusOcc { - static void Name(std::vector & name){name.push_back(std::string("RadiusdOcc"));T::Name(name);} -}; - -///*----------------------------- VFADJ ------------------------------*/ - -template class VFAdjOcc: public T { -public: - typedef typename T::VertType VertType; - typedef typename T::FacePointer FacePointer; - FacePointer &Fp() {return CAT< vector_occ,FacePointer>::Instance()->Get((VertType*)this); } - int &Zp() {return _zp; } - static bool HasVFAdjacency() { return true; } -private: - typename T::FacePointer _fp ; - int _zp ; -}; - - } // end namespace vert -}// end namespace vcg -#endif diff --git a/vcg/simplex/vertexplus/component_ocf.h b/vcg/simplex/vertexplus/component_ocf.h deleted file mode 100644 index c2c85b46..00000000 --- a/vcg/simplex/vertexplus/component_ocf.h +++ /dev/null @@ -1,645 +0,0 @@ -/**************************************************************************** -* VCGLib o o * -* Visual and Computer Graphics Library o o * -* _ O _ * -* Copyright(C) 2004 \/)\/ * -* Visual Computing Lab /\/| * -* ISTI - Italian National Research Council | * -* \ * -* All rights reserved. * -* * -* This program is free software; you can redistribute it and/or modify * -* it under the terms of the GNU General Public License as published by * -* the Free Software Foundation; either version 2 of the License, or * -* (at your option) any later version. * -* * -* This program is distributed in the hope that it will be useful, * -* but WITHOUT ANY WARRANTY; without even the implied warranty of * -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -* GNU General Public License (http://www.gnu.org/licenses/gpl.txt) * -* for more details. * -* * -****************************************************************************/ -/**************************************************************************** - History - -$Log: not supported by cvs2svn $ -Revision 1.16 2008/04/03 23:15:40 cignoni -added optional mark and cleaned up some nasty type bugs. - -Revision 1.15 2008/03/17 11:39:15 ganovelli -added curvature and curvatruredir (compiled .net 2005 and gcc) - -Revision 1.14 2008/03/11 09:22:07 cignoni -Completed the garbage collecting functions CompactVertexVector and CompactFaceVector. - -Revision 1.13 2008/02/05 20:42:43 cignoni -Other small typos - -Revision 1.12 2008/02/04 21:26:49 ganovelli -added ImportLocal which imports all local attributes into vertexplus and faceplus. -A local attribute is everything (N(), C(), Q()....) except pointers to other simplices -(i.e. FFAdj, VFAdj, VertexRef) which are set to NULL. -Added some function for const attributes - -Revision 1.11 2007/12/11 18:25:31 cignoni -added missing include limits - -Revision 1.10 2007/12/11 11:36:03 cignoni -Added the CompactVertexVector garbage collecting function. - -Revision 1.9 2006/12/11 23:42:00 ganovelli -bug Index()() instead of Index() - -Revision 1.8 2006/12/04 11:17:42 ganovelli -added forward declaration of TriMesh - -Revision 1.7 2006/11/07 17:22:52 cignoni -many gcc compiling issues - -Revision 1.6 2006/11/07 15:13:57 zifnab1974 -Necessary changes for compilation with gcc 3.4.6. Especially the hash function is a problem - -Revision 1.5 2006/11/07 11:29:24 cignoni -Corrected some errors in the reflections Has*** functions - -Revision 1.4 2006/10/31 16:02:59 ganovelli -vesione 2005 compliant - -Revision 1.3 2006/02/28 11:59:55 ponchio -g++ compliance: - -begin() -> (*this).begin() and for end(), size(), Base(), Index() - -Revision 1.2 2005/12/12 11:17:32 cignoni -Corrected update function, now only the needed simplexes should be updated. - -Revision 1.1 2005/10/14 15:07:59 cignoni -First Really Working version - - -****************************************************************************/ - -/* -Note -OCF = Optional Component Fast (hopefully) -compare with OCC(Optional Component Compact) - -Mainly the trick here is to store a base pointer in each simplex... - -****************************************************************************/ -#ifndef __VCG_VERTEX_PLUS_COMPONENT_OCF -#define __VCG_VERTEX_PLUS_COMPONENT_OCF - -#include - -#include -#include - -namespace vcg { - namespace vertex { -/* -All the Components that can be added to a vertex should be defined in the namespace vert: - -*/ -template -class vector_ocf: public std::vector { - typedef std::vector BaseType; - typedef typename vector_ocf::iterator ThisTypeIterator; - -public: - vector_ocf():std::vector(){ - QualityEnabled = false; - ColorEnabled = false; - MarkEnabled = false; - NormalEnabled = false; - VFAdjacencyEnabled = false; - CurvatureEnabled = false; - CurvatureEnabled = false; - CurvatureDirEnabled = false; - RadiusEnabled = false; - } - - // override di tutte le funzioni che possono spostare - // l'allocazione in memoria del container - void push_back(const VALUE_TYPE & v) - { - BaseType::push_back(v); - BaseType::back()._ovp = this; - if (ColorEnabled) CV.push_back(vcg::Color4b(vcg::Color4b::White)); - if (MarkEnabled) MV.push_back(0); - if (NormalEnabled) NV.push_back(typename VALUE_TYPE::NormalType()); - if (VFAdjacencyEnabled) AV.push_back(VFAdjType()); - if (CurvatureEnabled) CuV.push_back(typename VALUE_TYPE::CurvatureType()); - if (CurvatureDirEnabled) CuDV.push_back(typename VALUE_TYPE::CurvatureDirType()); - if (RadiusEnabled) RadiusV.push_back(typename VALUE_TYPE::RadiusType()); - } - void pop_back(); - void resize(const unsigned int & _size) - { - const unsigned int oldsize = BaseType::size(); - BaseType::resize(_size); - if(oldsize<_size){ - ThisTypeIterator firstnew = BaseType::begin(); - advance(firstnew,oldsize); - _updateOVP(firstnew,(*this).end()); - } - if (ColorEnabled) CV.resize(_size); - if (MarkEnabled) MV.resize(_size); - if (NormalEnabled) NV.resize(_size); - if (VFAdjacencyEnabled) AV.resize(_size); - if (CurvatureEnabled) CuV.resize(_size); - if (CurvatureDirEnabled) CuDV.resize(_size); - if (RadiusEnabled) RadiusV.resize(_size); - } - - void reserve(const unsigned int & _size) - { - BaseType::reserve(_size); - if (ColorEnabled) CV.reserve(_size); - if (MarkEnabled) MV.reserve(_size); - if (NormalEnabled) NV.reserve(_size); - if (VFAdjacencyEnabled) AV.reserve(_size); - if (CurvatureEnabled) CuV.reserve(_size); - if (CurvatureDirEnabled) CuDV.reserve(_size); - if (RadiusEnabled) RadiusV.reserve(_size); - } - - void _updateOVP(ThisTypeIterator lbegin, ThisTypeIterator lend) - { - ThisTypeIterator vi; - for(vi=lbegin;vi!=lend;++vi) - (*vi)._ovp=this; - } - -// this function is called by the specialized Reorder function, that is called whenever someone call the allocator::CompactVertVector -void ReorderVert(std::vector &newVertIndex ) -{ - size_t i=0; - if (ColorEnabled) assert( CV.size() == newVertIndex.size() ); - if (MarkEnabled) assert( MV.size() == newVertIndex.size() ); - if (NormalEnabled) assert( NV.size() == newVertIndex.size() ); - if (VFAdjacencyEnabled) assert( AV.size() == newVertIndex.size() ); - if (CurvatureEnabled) assert(CuV.size() == newVertIndex.size() ); - if (CurvatureDirEnabled)assert(CuDV.size() == newVertIndex.size() ); - assert( (!RadiusEnabled) || RadiusV.size() == newVertIndex.size() ); - - for(i=0;i::max() ) - { - assert(newVertIndex[i] <= i); - if (ColorEnabled) CV[newVertIndex[i]] = CV[i]; - if (MarkEnabled) MV[newVertIndex[i]] = MV[i]; - if (NormalEnabled) NV[newVertIndex[i]] = NV[i]; - if (VFAdjacencyEnabled) AV[newVertIndex[i]] = AV[i]; - if (CurvatureEnabled) CuV[newVertIndex[i]] = CuV[i]; - if (CurvatureDirEnabled) CuDV[newVertIndex[i]] =CuDV[i]; - if (RadiusEnabled) RadiusV[newVertIndex[i]] = RadiusV[i]; - } - } - - if (ColorEnabled) CV.resize(BaseType::size()); - if (MarkEnabled) MV.resize(BaseType::size()); - if (NormalEnabled) NV.resize(BaseType::size()); - if (VFAdjacencyEnabled) AV.resize(BaseType::size()); - if (CurvatureEnabled) CuV.resize(BaseType::size()); - if (CurvatureDirEnabled) CuDV.resize(BaseType::size()); - if (RadiusEnabled) RadiusV.resize(BaseType::size()); -} - - - -//////////////////////////////////////// -// Enabling Eunctions - -bool IsQualityEnabled() const {return QualityEnabled;} -void EnableQuality() { - assert(VALUE_TYPE::HasQualityOcf()); - QualityEnabled=true; - QV.resize((*this).size()); -} - -void DisableQuality() { - assert(VALUE_TYPE::HasQualityOcf()); - QualityEnabled=false; - QV.clear(); -} - -bool IsColorEnabled() const {return ColorEnabled;} -void EnableColor() { - assert(VALUE_TYPE::HasColorOcf()); - ColorEnabled=true; - CV.resize((*this).size()); -} - -void DisableColor() { - assert(VALUE_TYPE::HasColorOcf()); - ColorEnabled=false; - CV.clear(); -} - -bool IsMarkEnabled() const {return MarkEnabled;} -void EnableMark() { - assert(VALUE_TYPE::HasFaceMarkOcf()); - MarkEnabled=true; - MV.resize((*this).size()); -} - -void DisableMark() { - assert(VALUE_TYPE::HasFaceMarkOcf()); - MarkEnabled=false; - MV.clear(); -} - -bool IsNormalEnabled() const {return NormalEnabled;} -void EnableNormal() { - assert(VALUE_TYPE::HasNormalOcf()); - NormalEnabled=true; - NV.resize((*this).size()); -} - -void DisableNormal() { - assert(VALUE_TYPE::HasNormalOcf()); - NormalEnabled=false; - NV.clear(); -} - -void EnableVFAdjacency() { - assert(VALUE_TYPE::HasVFAdjacencyOcf()); - VFAdjacencyEnabled=true; - AV.resize((*this).size()); -} - -void DisableVFAdjacency() { - assert(VALUE_TYPE::HasVFAdjacencyOcf()); - VFAdjacencyEnabled=false; - AV.clear(); -} - -bool IsCurvatureEnabled() const {return CurvatureEnabled;} -void EnableCurvature() { - assert(VALUE_TYPE::HasCurvatureOcf()); - CurvatureEnabled=true; - CuV.resize((*this).size()); -} - -void DisableCurvature() { - assert(VALUE_TYPE::HasCurvatureOcf()); - CurvatureEnabled=false; - CuV.clear(); -} - -bool IsCurvatureDirEnabled() const {return CurvatureDirEnabled;} -void EnableCurvatureDir() { - assert(VALUE_TYPE::HasCurvatureDirOcf()); - CurvatureDirEnabled=true; - CuDV.resize((*this).size()); -} - -void DisableCurvatureDir() { - assert(VALUE_TYPE::HasCurvatureDirOcf()); - CurvatureDirEnabled=false; - CuDV.clear(); -} - -bool IsRadiusEnabled() const {return RadiusEnabled;} -void EnableRadius() { - assert(VALUE_TYPE::HasRadiusOcf()); - RadiusEnabled=true; - RadiusV.resize((*this).size()); -} - -void DisableRadius() { - assert(VALUE_TYPE::HasRadiusOcf()); - RadiusEnabled=false; - RadiusV.clear(); -} - -struct VFAdjType { - typename VALUE_TYPE::FacePointer _fp ; - int _zp ; - }; - -public: - std::vector QV; - std::vector CuV; - std::vector CuDV; - std::vector RadiusV; - std::vector CV; - std::vector NV; - std::vector AV; - std::vector MV; - - bool QualityEnabled; - bool ColorEnabled; - bool NormalEnabled; - bool VFAdjacencyEnabled; - bool CurvatureEnabled; - bool CurvatureDirEnabled; - bool MarkEnabled; - bool RadiusEnabled; -}; - - -//template<> void EnableAttribute(){ NormalEnabled=true;} - -/*------------------------- COORD -----------------------------------------*/ -/*----------------------------- VFADJ ------------------------------*/ - - -template class VFAdjOcf: public T { -public: - typename T::FacePointer &VFp() { - assert((*this).Base().VFAdjacencyEnabled); - return (*this).Base().AV[(*this).Index()]._fp; - } - - typename T::FacePointer cVFp() const { - if(! (*this).Base().VFAdjacencyEnabled ) return 0; - else return (*this).Base().AV[(*this).Index()]._fp; - } - - int &VFi() { - assert((*this).Base().VFAdjacencyEnabled); - return (*this).Base().AV[(*this).Index()]._zp; - } - template - void ImportLocal(const LeftV & leftV) - { - if((*this).Base().VFAdjacencyEnabled) // init the data only if they are enabled! - { - VFp() = NULL; - VFi() = -1; - } - T::ImportLocal(leftV); - } - - static bool HasVFAdjacency() { return true; } - static bool HasVFAdjacencyOcf() {assert(!T::HasVFAdjacencyOcf()); return true; } - -private: -}; - -/*------------------------- Normal -----------------------------------------*/ - -template class NormalOcf: public T { -public: - typedef A NormalType; - static bool HasNormal() { return true; } - static bool HasNormalOcf() { return true; } - - NormalType &N() { - // you cannot use Normals before enabling them with: yourmesh.vert.EnableNormal() - assert((*this).Base().NormalEnabled); - return (*this).Base().NV[(*this).Index()]; } - const NormalType &N() const { - // you cannot use Normals before enabling them with: yourmesh.vert.EnableNormal() - assert((*this).Base().NormalEnabled); - return (*this).Base().NV[(*this).Index()]; } - - template - void ImportLocal(const LeftV & leftV){ - if((*this).Base().NormalEnabled && leftV.Base().NormalEnabled ) // copy the data only if they are enabled in both vertices - N().Import(leftV.cN()); - T::ImporLocal(leftV);} -}; - -template class Normal3sOcf: public NormalOcf {}; -template class Normal3fOcf: public NormalOcf {}; -template class Normal3dOcf: public NormalOcf {}; - -///*-------------------------- COLOR ----------------------------------*/ - -template class ColorOcf: public T { -public: - typedef A ColorType; - ColorType &C() { assert((*this).Base().NormalEnabled); return (*this).Base().CV[(*this).Index()]; } - const ColorType &cC() const { assert((*this).Base().ColorEnabled); return (*this).Base().CV[(*this).Index()]; } - template - void ImportLocal(const LeftV & leftV) - { - if((*this).Base().ColorEnabled && leftV.Base().ColorEnabled ) // copy the data only if they are enabled in both vertices - C() = leftV.cC(); - T::ImporLocal(leftV); - } - - static bool HasColor() { return true; } - static bool HasColorOcf() { assert(!T::HasColorOcf()); return true; } -}; - -template class Color4bOcf: public ColorOcf {}; - -///*-------------------------- QUALITY ----------------------------------*/ - -template class QualityOcf: public T { -public: - typedef A QualityType; - QualityType &Q() { assert((*this).Base().QualityEnabled); return (*this).Base().QV[(*this).Index()]; } - template - void ImportLocal(const LeftV & leftV) - { - if((*this).Base().QualityEnabled && leftV.Base().QualityEnabled ) // copy the data only if they are enabled in both vertices - Q() = leftV.cQ(); - T::ImporLocal(leftV); - } - static bool HasQuality() { return true; } - static bool HasQualityOcf() { assert(!T::HasQualityOcf()); return true; } -}; - -template class QualityfOcf: public QualityOcf {}; - -///*-------------------------- MARK ----------------------------------*/ - -template class MarkOcf: public T { -public: - inline int & IMark() { - assert((*this).Base().MarkEnabled); - return (*this).Base().MV[(*this).Index()]; - } - - inline int IMark() const { - assert((*this).Base().MarkEnabled); - return (*this).Base().MV[(*this).Index()]; - } - - template - void ImportLocal(const LeftV & leftV) - { - if((*this).Base().MarkEnabled && leftV.Base().MarkEnabled ) // copy the data only if they are enabled in both vertices - IMark() = leftV.IMark(); - T::ImportLocal(leftV); - } - static bool HasFaceMark() { return true; } - static bool HasFaceMarkOcf() { return true; } - inline void InitIMark() { IMark() = 0; } -}; - - -///*-------------------------- CURVATURE ----------------------------------*/ - -template class CurvatureOcf: public TT { -public: - typedef Point2 CurvatureType; - typedef typename CurvatureType::ScalarType ScalarType; - - ScalarType &Kh(){ assert((*this).Base().CurvatureEnabled); return (*this).Base().CuV[(*this).Index()][0];} - ScalarType &Kg(){ assert((*this).Base().CurvatureEnabled); return (*this).Base().CuV[(*this).Index()][1];} - const ScalarType &cKh() const { assert((*this).Base().CurvatureEnabled); return (*this).Base().CuV[(*this).Index()][0];} - const ScalarType &cKg() const { assert((*this).Base().CurvatureEnabled); return (*this).Base().CuV[(*this).Index()][1];} - - template - void ImportLocal(const LeftV & leftV){ - if((*this).Base().CurvatureEnabled && leftV.Base().CurvatureEnabled ) // copy the data only if they are enabled in both vertices - { - (*this).Base().CuV[(*this).Index()][0] = leftV.cKh(); - (*this).Base().CuV[(*this).Index()][1] = leftV.cKg(); - } - TT::ImportLocal(leftV); - } - - static bool HasCurvatureOcf() { return true; } - static void Name(std::vector & name){name.push_back(std::string("CurvatureOcf"));TT::Name(name);} - -private: -}; - -template class CurvaturefOcf: public CurvatureOcf {}; -template class CurvaturedOcf: public CurvatureOcf {}; - - -///*-------------------------- CURVATURE DIR ----------------------------------*/ - -template -struct CurvatureDirTypeOcf{ - typedef Point3 VecType; - typedef S ScalarType; - CurvatureDirTypeOcf () {} - Point3max_dir,min_dir; - S k1,k2; -}; - - -template class CurvatureDirOcf: public TT { -public: - typedef A CurvatureDirType; - typedef typename CurvatureDirType::VecType VecType; - typedef typename CurvatureDirType::ScalarType ScalarType; - - VecType &PD1(){ assert((*this).Base().CurvatureDirEnabled); return (*this).Base().CuDV[(*this).Index()].max_dir;} - VecType &PD2(){ assert((*this).Base().CurvatureDirEnabled); return (*this).Base().CuDV[(*this).Index()].min_dir;} - const VecType &cPD1() const {assert((*this).Base().CurvatureDirEnabled); return (*this).Base().CuV[(*this).Index()].max_dir;} - const VecType &cPD2() const {assert((*this).Base().CurvatureDirEnabled); return (*this).Base().CuV[(*this).Index()].min_dir;} - - ScalarType &K1(){ assert((*this).Base().CurvatureDirEnabled); return (*this).Base().CuDV[(*this).Index()].k1;} - ScalarType &K2(){ assert((*this).Base().CurvatureDirEnabled); return (*this).Base().CuDV[(*this).Index()].k2;} - const ScalarType &cK1() const {assert((*this).Base().CurvatureDirEnabled); return (*this).Base().CuDV[(*this).Index()].k1;} - const ScalarType &cK2()const {assert((*this).Base().CurvatureDirEnabled); return (*this).Base().CuDV[(*this).Index()].k2;} - - static bool HasCurvatureDirOcf() { return true; } - static void Name(std::vector & name){name.push_back(std::string("CurvatureDirOcf"));TT::Name(name);} - -private: -}; - - -template class CurvatureDirfOcf: public CurvatureDirOcf, T> { -public: static void Name(std::vector & name){name.push_back(std::string("CurvatureDirfOcf"));T::Name(name);} -}; -template class CurvatureDirdOcf: public CurvatureDirOcf, T> { -public: static void Name(std::vector & name){name.push_back(std::string("CurvatureDirdOcf"));T::Name(name);} -}; - - -///*-------------------------- RADIUS ----------------------------------*/ - -template class RadiusOcf: public TT { -public: - typedef A RadiusType; - typedef RadiusType ScalarType; - - RadiusType &R(){ assert((*this).Base().RadiusEnabled); return (*this).Base().RadiusV[(*this).Index()];} - const RadiusType &cR() const { assert((*this).Base().RadiusEnabled); return (*this).Base().RadiusV[(*this).Index()];} - - template - void ImportLocal(const LeftV & leftV) - { - if ((*this).Base().RadiusEnabled && leftV.Base().RadiusEnabled ) - (*this).Base().RadiusV[(*this).Index()] = leftV.cR(); - TT::ImportLocal(leftV); - } - - static bool HasRadius() { return true; } - static bool HasRadiusOcf() { return true; } - static void Name(std::vector & name){name.push_back(std::string("RadiusOcf")); TT::Name(name);} - -private: -}; - -template class RadiusfOcf: public RadiusOcf {}; -template class RadiusdOcf: public RadiusOcf {}; - - -///*-------------------------- InfoOpt ----------------------------------*/ - -template < class T> class InfoOcf: public T { -public: - vector_ocf &Base() const { return *_ovp;} - - inline int Index() const { - typename T::VertType const *tp=static_cast(this); - int tt2=tp- &*(_ovp->begin()); - return tt2; - } -public: - vector_ocf *_ovp; - - static bool HasQualityOcf() { return false; } - static bool HasVFAdjacencyOcf() { return false; } -}; - - -} // end namespace vert - - -namespace tri -{ - - template < class, class,class > class TriMesh; - - template < class VertexType, class FaceContainerType, class EdgeContainerType > - bool HasPerVertexRadius (const TriMesh < vertex::vector_ocf< VertexType > , FaceContainerType, EdgeContainerType > & m) - { - if(VertexType::HasRadiusOcf()) return m.vert.IsRadiusEnabled(); - else return VertexType::HasRadius(); - } - - template < class VertexType, class FaceContainerType, class EdgeContainerType > - bool HasPerVertexQuality (const TriMesh < vertex::vector_ocf< VertexType > , FaceContainerType , EdgeContainerType> & m) - { - if(VertexType::HasQualityOcf()) return m.vert.IsQualityEnabled(); - else return VertexType::HasQuality(); - } - - template < class VertexType, class FaceContainerType, class EdgeContainerType > - bool HasPerVertexCurvature (const TriMesh < vertex::vector_ocf< VertexType > , FaceContainerType, EdgeContainerType > & m) - { - if(VertexType::HasCurvatureOcf()) return m.vert.IsCurvatureEnabled(); - else return VertexType::HasCurvature(); - } - - template < class VertexType, class FaceContainerType, class EdgeContainerType > - bool HasPerVertexCurvatureDir (const TriMesh < vertex::vector_ocf< VertexType > , FaceContainerType, EdgeContainerType > & m) - { - if(VertexType::HasCurvatureDirOcf()) return m.vert.IsCurvatureDirEnabled(); - else return VertexType::HasCurvatureDir(); - } - - template < class VertexType > - void ReorderVert( std::vector &newVertIndex, vertex::vector_ocf< VertexType > &vertVec) - { - vertVec.ReorderVert(newVertIndex); - } -} -}// end namespace vcg -#endif diff --git a/vcg/simplex/vertexplus/component_sph.h b/vcg/simplex/vertexplus/component_sph.h deleted file mode 100644 index a9c80b0e..00000000 --- a/vcg/simplex/vertexplus/component_sph.h +++ /dev/null @@ -1,58 +0,0 @@ -#ifndef COMPONENT_SPH_ -#define COMPONENT_SPH_ - -#include - -namespace vcg { -namespace vertex { - -template class Sph: public T -{ -public: - typedef A SphType; - SphType &SH() { return _harmonics; } - const SphType &cSH() const { return _harmonics; } - template < class LeftV> - void ImportLocal(const LeftV & left ) { SH() = left.cSH(); T::ImportLocal( left); } - static bool HasSH() { return true; } - static void Name(std::vector & name){name.push_back(std::string("Spherical Harmonics"));T::Name(name);} - -private: - SphType _harmonics; -}; - -template class Sph9f: public Sph, T> { - public: static void Name(std::vector & name){name.push_back(std::string("Sph9f"));T::Name(name);} -}; - -template class Sph16f: public Sph, T> { - public: static void Name(std::vector & name){name.push_back(std::string("Sph16f"));T::Name(name);} -}; - -template class Sph25f: public Sph, T> { - public: static void Name(std::vector & name){name.push_back(std::string("Sph25f"));T::Name(name);} -}; - -template class Sph36f: public Sph, T> { - public: static void Name(std::vector & name){name.push_back(std::string("Sph36f"));T::Name(name);} -}; - -template class Sph9d: public Sph, T> { - public: static void Name(std::vector & name){name.push_back(std::string("Sph9d"));T::Name(name);} -}; - -template class Sph16d: public Sph, T> { - public: static void Name(std::vector & name){name.push_back(std::string("Sph16d"));T::Name(name);} -}; - -template class Sph25d: public Sph, T> { - public: static void Name(std::vector & name){name.push_back(std::string("Sph25d"));T::Name(name);} -}; - -template class Sph36d: public Sph, T> { - public: static void Name(std::vector & name){name.push_back(std::string("Sph36d"));T::Name(name);} -}; - -}} - -#endif /*COMPONENT_H_*/ diff --git a/vcg/simplex/vertexplus/with/afvcvnvq.h b/vcg/simplex/vertexplus/with/afvcvnvq.h deleted file mode 100644 index aa9aa535..00000000 --- a/vcg/simplex/vertexplus/with/afvcvnvq.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef __VCGLIB_VERTEXPLUS_AFVCVNVQ_TYPE -#define __VCGLIB_VERTEXPLUS_AFVCVNVQ_TYPE -namespace vcg { - template - class VertexAFVCVNVQd : public VertexSimp2< VertexAFVCVNVQd, DumET, FaceTemplate, vert::Normal3d, vert::VFAdj, vert::Flag, vert::Coord3d> {}; - template - class VertexAFVCVNVQf : public VertexSimp2< VertexAFVCVNVQf, DumET, FaceTemplate, vert::Normal3f, vert::VFAdj, vert::Flag, vert::Coord3f> {}; -} -#endif diff --git a/vcg/simplex/vertexplus/with/afvn.h b/vcg/simplex/vertexplus/with/afvn.h deleted file mode 100644 index e26f8e78..00000000 --- a/vcg/simplex/vertexplus/with/afvn.h +++ /dev/null @@ -1,11 +0,0 @@ -#ifndef __VCGLIB_VERTEXPLUS_AFVN_TYPE -#define __VCGLIB_VERTEXPLUS_AFVN_TYPE -namespace vcg { - - template - class VertexAFVNd : public VertexSimp2< VertexAFVNd, EdgeTemplate, FaceTemplate, vert::Normal3d, vert::VFAdj, vert::Flag, vert::Coord3d> {}; - - template - class VertexAFVNf : public VertexSimp2< VertexAFVNf, EdgeTemplate, FaceTemplate, vert::Normal3f, vert::VFAdj, vert::Flag, vert::Coord3f> {}; -} -#endif diff --git a/vcg/simplex/vertexplus/with/readme.txt b/vcg/simplex/vertexplus/with/readme.txt deleted file mode 100644 index e2415c02..00000000 --- a/vcg/simplex/vertexplus/with/readme.txt +++ /dev/null @@ -1,53 +0,0 @@ -/**************************************************************************** -* VCGLib o o * -* Visual and Computer Graphics Library o o * -* _ O _ * -* Copyright(C) 2004 \/)\/ * -* Visual Computing Lab /\/| * -* ISTI - Italian National Research Council | * -* \ * -* All rights reserved. * -* * -* This program is free software; you can redistribute it and/or modify * -* it under the terms of the GNU General Public License as published by * -* the Free Software Foundation; either version 2 of the License, or * -* (at your option) any later version. * -* * -* This program is distributed in the hope that it will be useful, * -* but WITHOUT ANY WARRANTY; without even the implied warranty of * -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -* GNU General Public License (http://www.gnu.org/licenses/gpl.txt) * -* for more details. * -* * -****************************************************************************/ - -This folders contains most common VERTEX configuration files. - -The name of the file specifies the members that are added to the vertex -class. The name is a sequence of letter pairs, in strict alphabetical order. The -possible admitted letters pairs are: - -Adjacency Info - -AF - Vertex-Face adjacency -AE - Vertex-Edge adjacency -AT - Vertex-Tetra adjacency - -Per-Vertex Data -VC - Color -VN - Normal -VM - Incremental Mark -VQ - Quality -VT - Texture Coords - -E.g. - -#include - -generate a type - -VertexAFVCVQ - -That can store V-F adjacency, color, normal and quality. - - diff --git a/vcg/simplex/vertexplus/with/vcvn.h b/vcg/simplex/vertexplus/with/vcvn.h deleted file mode 100644 index 4db112e9..00000000 --- a/vcg/simplex/vertexplus/with/vcvn.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef __VCGLIB_VERTEXPLUS_VCVN_TYPE -#define __VCGLIB_VERTEXPLUS_VCVN_TYPE -namespace vcg { - - template - class VertexVCVNf : public VertexSimp1< VertexVCVNf, DumET, vert::Normal3f, vert::Color4b, vert::Flag, vert::Coord3f> {}; - template - class VertexVCVNd : public VertexSimp1< VertexVCVNd, DumET, vert::Normal3d, vert::Color4b, vert::Flag, vert::Coord3d> {}; - -} - -#endif diff --git a/vcg/simplex/vertexplus/with/vn.h b/vcg/simplex/vertexplus/with/vn.h deleted file mode 100644 index 010f21cc..00000000 --- a/vcg/simplex/vertexplus/with/vn.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef __VCGLIB_VERTEXPLUS_VN_TYPE -#define __VCGLIB_VERTEXPLUS_VN_TYPE -namespace vcg { - - template - class VertexVNf : public VertexSimp2< VertexVNf, EdgeTemplate, FaceTemplate, vert::Normal3f, vert::Color4b, vert::Flag, vert::Coord3f> {}; - - template - class VertexVNd : public VertexSimp2< VertexVNd, EdgeTemplate, FaceTemplate, vert::Normal3d, vert::Color4b, vert::Flag, vert::Coord3d> {}; - -} - -#endif