Cambiate Has*Opt in Has*Occ e aggiunti typedef per la compilazione di Occ

This commit is contained in:
ganovelli 2006-12-04 11:00:02 +00:00
parent 480c16bbfe
commit ee863845d1
1 changed files with 20 additions and 9 deletions

View File

@ -24,6 +24,10 @@
History History
$Log: not supported by cvs2svn $ $Log: not supported by cvs2svn $
Revision 1.9 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.8 2006/10/07 09:59:42 cignoni Revision 1.8 2006/10/07 09:59:42 cignoni
Added missing const to EmptyFF Added missing const to EmptyFF
@ -139,8 +143,8 @@ public:
static bool HasWedgeNormal() { return false; } static bool HasWedgeNormal() { return false; }
static bool HasFaceNormal() { return false; } static bool HasFaceNormal() { return false; }
static bool HasWedgeNormalOpt() { return false; } static bool HasWedgeNormalOcc() { return false; }
static bool HasFaceNormalOpt() { return false; } static bool HasFaceNormalOcc() { return false; }
// void ComputeNormal() {assert(0);} // void ComputeNormal() {assert(0);}
// void ComputeNormalizedNormal() {assert(0);} // void ComputeNormalizedNormal() {assert(0);}
@ -197,14 +201,17 @@ template <class T> class Normal3d: public NormalAbs<vcg::Point3d, T> {};
template <class TT> class EmptyWedgeTexture: public TT { template <class TT> class EmptyWedgeTexture: public TT {
public: public:
typedef int WedgeTextureType;
typedef vcg::TCoord2<float,1> TexCoordType; typedef vcg::TCoord2<float,1> TexCoordType;
TexCoordType &WT(const int) { static TexCoordType dummy_texture; return dummy_texture;} TexCoordType &WT(const int) { static TexCoordType dummy_texture; return dummy_texture;}
TexCoordType const &cWT(const int) const { static TexCoordType dummy_texture; return dummy_texture;} TexCoordType const &cWT(const int) const { static TexCoordType dummy_texture; return dummy_texture;}
static bool HasWedgeTexture() { return false; } static bool HasWedgeTexture() { return false; }
static bool HasWedgeTextureOcc() { return false; }
}; };
template <class A, class TT> class WedgeTexture: public TT { template <class A, class TT> class WedgeTexture: public TT {
public: public:
typedef int WedgeTextureType;
typedef A TexCoordType; typedef A TexCoordType;
TexCoordType &WT(const int i) { return _wt[i]; } TexCoordType &WT(const int i) { return _wt[i]; }
TexCoordType const &cWT(const int i) const { return _wt[i]; } TexCoordType const &cWT(const int i) const { return _wt[i]; }
@ -225,7 +232,7 @@ public:
int &Flags() { static int dummyflags(0); return dummyflags; } int &Flags() { static int dummyflags(0); return dummyflags; }
const int Flags() const { return 0; } const int Flags() const { return 0; }
static bool HasFlags() { return false; } static bool HasFlags() { return false; }
static bool HasFlagsOcc() { return false; }
}; };
template <class T> class BitFlags: public T { template <class T> class BitFlags: public T {
@ -252,6 +259,7 @@ public:
static bool HasFaceColor() { return false; } static bool HasFaceColor() { return false; }
static bool HasWedgeColor() { return false; } static bool HasWedgeColor() { return false; }
static bool HasFaceQuality() { return false; } static bool HasFaceQuality() { return false; }
static bool HasFaceColorOcc() { return false;}
}; };
template <class A, class T> class Color: public T { template <class A, class T> class Color: public T {
public: public:
@ -284,6 +292,7 @@ public:
typedef A QualityType; typedef A QualityType;
QualityType &Q() { return _quality; } QualityType &Q() { return _quality; }
static bool HasFaceQuality() { return true; } static bool HasFaceQuality() { return true; }
static bool HasFaceQualityOcc() { return true; }
private: private:
QualityType _quality; QualityType _quality;
@ -296,8 +305,9 @@ template <class T> class Qualityd: public Quality<double, T> {};
template <class T> class EmptyMark: public T { template <class T> class EmptyMark: public T {
public: public:
typedef int MarkType;
static bool HasMark() { return false; } static bool HasMark() { return false; }
static bool HasMarkOpt() { return false; } static bool HasMarkOcc() { return false; }
inline void InitIMark() { } inline void InitIMark() { }
inline int & IMark() { assert(0); static int tmp=-1; return tmp;} inline int & IMark() { assert(0); static int tmp=-1; return tmp;}
inline const int IMark() const {return 0;} inline const int IMark() const {return 0;}
@ -306,7 +316,7 @@ public:
template <class T> class Mark: public T { template <class T> class Mark: public T {
public: public:
static bool HasMark() { return true; } static bool HasMark() { return true; }
static bool HasMarkOpt() { return true; } static bool HasMarkOcc() { return true; }
inline void InitIMark() { _imark = 0; } inline void InitIMark() { _imark = 0; }
inline int & IMark() { return _imark;} inline int & IMark() { return _imark;}
inline const int & IMark() const {return _imark;} inline const int & IMark() const {return _imark;}
@ -321,6 +331,7 @@ public:
template <class T> class EmptyAdj: public T { template <class T> class EmptyAdj: public T {
public: public:
typedef int VFAdjType;
typename T::FacePointer &VFp(const int) { static typename T::FacePointer fp=0; return fp; } typename T::FacePointer &VFp(const int) { static typename T::FacePointer fp=0; return fp; }
typename T::FacePointer const cVFp(const int) const { static typename T::FacePointer const fp=0; return fp; } typename T::FacePointer const cVFp(const int) const { static typename T::FacePointer const fp=0; return fp; }
typename T::FacePointer &FFp(const int) { static typename T::FacePointer fp=0; return fp; } typename T::FacePointer &FFp(const int) { static typename T::FacePointer fp=0; return fp; }
@ -329,8 +340,8 @@ public:
char &FFi(const int j){static char z=0; return z;}; char &FFi(const int j){static char z=0; return z;};
static bool HasVFAdjacency() { return false; } static bool HasVFAdjacency() { return false; }
static bool HasFFAdjacency() { return false; } static bool HasFFAdjacency() { return false; }
static bool HasFFAdjacencyOpt() { return false; } static bool HasFFAdjacencyOcc() { return false; }
static bool HasVFAdjacencyOpt() { return false; } static bool HasVFAdjacencyOcc() { return false; }
}; };
template <class T> class VFAdj: public T { template <class T> class VFAdj: public T {
@ -341,7 +352,7 @@ public:
typename T::FacePointer const cVFp(const int j) const { assert(j>=0 && j<3); return _vfp[j]; } typename T::FacePointer const cVFp(const int j) const { assert(j>=0 && j<3); return _vfp[j]; }
char &VFi(const int j) {return _vfi[j]; } char &VFi(const int j) {return _vfi[j]; }
static bool HasVFAdjacency() { return true; } static bool HasVFAdjacency() { return true; }
static bool HasVFAdjacencyOpt() { return false; } static bool HasVFAdjacencyOcc() { return false; }
private: private:
typename T::FacePointer _vfp[3] ; typename T::FacePointer _vfp[3] ;
char _vfi[3] ; char _vfi[3] ;
@ -362,7 +373,7 @@ public:
char &FFi(const int j) { return _ffi[j]; } char &FFi(const int j) { return _ffi[j]; }
const char &cFFi(const int j) const { return _ffi[j]; } const char &cFFi(const int j) const { return _ffi[j]; }
static bool HasFFAdjacency() { return true; } static bool HasFFAdjacency() { return true; }
static bool HasFFAdjacencyOpt() { return false; } static bool HasFFAdjacencyOcc() { return false; }
private: private:
typename T::FacePointer _ffp[3] ; typename T::FacePointer _ffp[3] ;