minor updates to keep it in line with the rest of the library

This commit is contained in:
Paolo Cignoni 2005-10-07 15:20:00 +00:00
parent 08a49f7305
commit 0bf4c6a185
2 changed files with 33 additions and 20 deletions

View File

@ -24,6 +24,9 @@
History History
$Log: not supported by cvs2svn $ $Log: not supported by cvs2svn $
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 Revision 1.6 2004/04/05 11:53:06 cignoni
addend constant access funcs addend constant access funcs
@ -104,13 +107,13 @@ template <class T> class Normal3d: public Normal<vcg::Point3d, T> {};
/*-------------------------- NORMAL ----------------------------------------*/ /*-------------------------- NORMAL ----------------------------------------*/
template <class T> class EmptyTexture: public T { template <class TT> class EmptyTexture: public TT {
public: public:
typedef vcg::TCoord2<float,1> TextureType; typedef vcg::TCoord2<float,1> TextureType;
TextureType &T() { static TextureType dummy_texture; return dummy_texture; } TextureType &T() { static TextureType dummy_texture; return dummy_texture; }
static bool HasTexture() { return false; } static bool HasTexture() { return false; }
}; };
template <class A, class T> class Texture: public T { template <class A, class TT> class Texture: public TT {
public: public:
typedef A TextureType; typedef A TextureType;
TextureType &T() { return _t; } TextureType &T() { return _t; }
@ -120,9 +123,9 @@ private:
TextureType _t; TextureType _t;
}; };
template <class T> class Texture2s: public Texture<TCoord2<short,1>, T> {}; template <class TT> class Texture2s: public Texture<TCoord2<short,1>, TT> {};
template <class T> class Texture2f: public Texture<TCoord2<float,1>, T> {}; template <class TT> class Texture2f: public Texture<TCoord2<float,1>, TT> {};
template <class T> class Texture2d: public Texture<TCoord2<double,1>, T> {}; template <class TT> class Texture2d: public Texture<TCoord2<double,1>, TT> {};
/*------------------------- FLAGS -----------------------------------------*/ /*------------------------- FLAGS -----------------------------------------*/
template <class T> class EmptyFlag: public T { template <class T> class EmptyFlag: public T {
@ -187,14 +190,14 @@ template <class T> class Qualityd: public Quality<double, T> {};
template <class T> class EmptyVFAdj: public T { template <class T> class EmptyVFAdj: public T {
public: public:
typename T::FacePointer &VFb() { static typename T::FacePointer fp=0; return fp; } typename T::FacePointer &VFp() { static typename T::FacePointer fp=0; return fp; }
int &VFi(){static int z=0; return z;}; int &VFi(){static int z=0; return z;};
static bool HasVFAdjacency() { return false; } static bool HasVFAdjacency() { return false; }
}; };
template <class T> class VFAdj: public T { template <class T> class VFAdj: public T {
public: public:
typename T::FacePointer &VFb() {return _fp; } typename T::FacePointer &VFp() {return _fp; }
int &VFi() {return _zp; } int &VFi() {return _zp; }
static bool HasVFAdjacency() { return true; } static bool HasVFAdjacency() { return true; }
private: private:
@ -204,4 +207,4 @@ private:
} // end namespace vert } // end namespace vert
}// end namespace vcg }// end namespace vcg
#endif #endif

View File

@ -21,23 +21,33 @@
* * * *
****************************************************************************/ ****************************************************************************/
This folders contains most common vertex configuration files This folders contains most common VERTEX configuration files.
The name of the file specify the members that are added to the vertex class
The name is a sequence of letters, in strict alphabetical order.
The possible admitted letters are
A - vertex-face adjacency The name of the file specifies the members that are added to the vertex
C - Color class. The name is a sequence of letter pairs, in strict alphabetical order. The
N - Normal possible admitted letters pairs are:
Q - Quality
T - Texture Coords 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. E.g.
#include<vcg/simplex/vertex/with/acq.h> #include<vcg/simplex/vertex/with/afvcvnvq.h>
generate a type generate a type
VertexACQ<VScalarType,FaceType>
that can store V-F adjacency, color and quality. VertexAFVCVQ<VScalarType,FaceType>
That can store V-F adjacency, color, normal and quality.