From be1d887db6f9ccf86c5255bb228e7a849ed4016e Mon Sep 17 00:00:00 2001 From: dibenedetto Date: Fri, 28 Aug 2009 15:26:40 +0000 Subject: [PATCH] Renamed LeftT to RightT, added some checks and fixed method name. --- vcg/simplex/face/component.h | 82 ++++++++++++++++++------------------ 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/vcg/simplex/face/component.h b/vcg/simplex/face/component.h index aa8af5c8..6f408bfc 100644 --- a/vcg/simplex/face/component.h +++ b/vcg/simplex/face/component.h @@ -121,8 +121,8 @@ public: inline typename T::CoordType & P( const int j ) { assert(0); static typename T::CoordType coord(0, 0, 0); return coord; } inline const typename T::CoordType & P( const int j ) const { assert(0); static typename T::CoordType coord(0, 0, 0); return coord; } inline const typename T::CoordType &cP( const int j ) const { assert(0); static typename T::CoordType coord(0, 0, 0); return coord; } - template - void ImportLocal(const LeftF & leftF) {T::ImportLocal(leftF);} + template + void ImportLocal(const RightF & rightF) {T::ImportLocal(rightF);} inline void Alloc(const int & ns){T::Alloc(ns);} inline void Dealloc(){T::Dealloc();} static bool HasVertexRef() { return false; } @@ -173,8 +173,8 @@ public: inline typename T::VertexType * & UberV( const int j ) { assert(j>=0 && j<3); return v[j]; } inline const typename T::VertexType * const & UberV( const int j ) const { assert(j>=0 && j<3); return v[j]; } - template - void ImportLocal(const LeftF & leftF){ V(0) = NULL; V(1) = NULL; V(2) = NULL; T::ImportLocal(leftF);} + template + void ImportLocal(const RightF & rightF){ V(0) = NULL; V(1) = NULL; V(2) = NULL; T::ImportLocal(rightF);} inline void Alloc(const int & ns){T::Alloc(ns);} inline void Dealloc(){T::Dealloc();} @@ -199,8 +199,8 @@ public: NormalType &WN(int) { static NormalType dummy_normal(0, 0, 0); assert(0); return dummy_normal; } const NormalType cWN(int) const { static NormalType dummy_normal(0, 0, 0); return dummy_normal; } - template - void ImportLocal(const LeftF & leftF){ T::ImportLocal(leftF);} + template + void ImportLocal(const RightF & rightF){ T::ImportLocal(rightF);} static bool HasWedgeNormal() { return false; } static bool HasFaceNormal() { return false; } static bool HasWedgeNormalOcc() { return false; } @@ -215,8 +215,8 @@ public: typedef typename T::VertexType::NormalType NormalType; NormalType &N() { return _norm; } NormalType &cN() const { return _norm; } - template - void ImportLocal(const LeftF & leftF){ N() = leftF.cN(); T::ImportLocal(leftF);} + template + void ImportLocal(const RightF & rightF){ N() = rightF.cN(); T::ImportLocal(rightF);} inline void Alloc(const int & ns){T::Alloc(ns);} inline void Dealloc(){T::Dealloc();} static bool HasFaceNormal() { return true; } @@ -240,8 +240,8 @@ public: typedef A NormalType; NormalType &N() { return _norm; } NormalType cN() const { return _norm; } - template - void ImportLocal(const LeftF & leftF){ N() = leftF.cN(); T::ImportLocal(leftF);} + template + void ImportLocal(const RightF & rightF){ N() = rightF.cN(); T::ImportLocal(rightF);} inline void Alloc(const int & ns){T::Alloc(ns);} inline void Dealloc(){T::Dealloc();} static bool HasFaceNormal() { return true; } @@ -256,8 +256,8 @@ public: typedef typename T::VertexType::NormalType NormalType; NormalType &WN(const int j) { return _wnorm[j]; } const NormalType cWN(const int j) const { return _wnorm[j]; } - template - void ImportLocal(const LeftF & leftF){ for (int i=0; i<3; ++i) { WN(i) = leftF.cWN(i); } T::ImportLocal(leftF);} + template + void ImportLocal(const RightF & rightF){ for (int i=0; i<3; ++i) { WN(i) = rightF.cWN(i); } T::ImportLocal(rightF);} inline void Alloc(const int & ns){T::Alloc(ns);} inline void Dealloc(){T::Dealloc();} static bool HasWedgeNormal() { return true; } @@ -272,8 +272,8 @@ public: typedef A NormalType; NormalType &WN(const int i) { return _wn[i]; } NormalType const &cWN(const int i) const { return _wn[i]; } - template - void ImportLocal(const LeftF & leftF){ for (int i=0; i<3; ++i) { WN(i) = leftF.cWN(i); } T::ImportLocal(leftF);} + template + void ImportLocal(const RightF & rightF){ for (int i=0; i<3; ++i) { WN(i) = rightF.cWN(i); } T::ImportLocal(rightF);} inline void Alloc(const int & ns){T::Alloc(ns);} inline void Dealloc(){T::Dealloc();} static bool HasWedgeNormal() { return true; } @@ -312,8 +312,8 @@ public: typedef vcg::TexCoord2 TexCoordType; TexCoordType &WT(const int) { static TexCoordType dummy_texture; assert(0); return dummy_texture;} TexCoordType const &cWT(const int) const { static TexCoordType dummy_texture; return dummy_texture;} - template - void ImportLocal(const LeftF & leftF){ T::ImportLocal(leftF);} + template + void ImportLocal(const RightF & rightF){ T::ImportLocal(rightF);} inline void Alloc(const int & ns){T::Alloc(ns);} inline void Dealloc(){T::Dealloc();} static bool HasWedgeTexCoord() { return false; } @@ -327,8 +327,8 @@ public: typedef A TexCoordType; TexCoordType &WT(const int i) { return _wt[i]; } TexCoordType const &cWT(const int i) const { return _wt[i]; } - template - void ImportLocal(const LeftF & leftF){ for (int i=0; i<3; ++i) { WT(i) = leftF.cWT(i); } T::ImportLocal(leftF);} + template + void ImportLocal(const RightF & rightF){ for (int i=0; i<3; ++i) { WT(i) = rightF.cWT(i); } T::ImportLocal(rightF);} inline void Alloc(const int & ns){T::Alloc(ns);} inline void Dealloc(){T::Dealloc();} static bool HasWedgeTexCoord() { return true; } @@ -354,8 +354,8 @@ public: /// Return the vector of Flags(), senza effettuare controlli sui bit int &Flags() { static int dummyflags(0); assert(0); return dummyflags; } int Flags() const { return 0; } - template - void ImportLocal(const LeftF & leftF){ T::ImportLocal(leftF);} + template + void ImportLocal(const RightF & rightF){ T::ImportLocal(rightF);} inline void Alloc(const int & ns){T::Alloc(ns);} inline void Dealloc(){T::Dealloc();} static bool HasFlags() { return false; } @@ -370,8 +370,8 @@ public: int &Flags() {return _flags; } int Flags() const {return _flags; } const int & cFlags() const {return _flags; } - template - void ImportLocal(const LeftF & leftF){ Flags() = leftF.cFlags();T::ImportLocal(leftF);} + template + void ImportLocal(const RightF & rightF){ Flags() = rightF.cFlags();T::ImportLocal(rightF);} inline void Alloc(const int & ns){T::Alloc(ns);} inline void Dealloc(){T::Dealloc();} static bool HasFlags() { return true; } @@ -409,8 +409,8 @@ public: static bool HasMarkOcc() { return false; } static void Name(std::vector & name){T::Name(name);} - template - void ImportLocal(const LeftF & leftF){ T::ImportLocal(leftF);} + template + void ImportLocal(const RightF & rightF){ T::ImportLocal(rightF);} inline void Alloc(const int & ns){T::Alloc(ns);} inline void Dealloc(){T::Dealloc();} @@ -421,8 +421,8 @@ public: Color():_color(vcg::Color4b::White) {} ColorType &C() { return _color; } const ColorType &cC() const { return _color; } - template - void ImportLocal(const LeftF & leftF){ C() = leftF.cC();T::ImportLocal(leftF);} + template + void ImportLocal(const RightF & rightF){ C() = rightF.cC();T::ImportLocal(rightF);} inline void Alloc(const int & ns){T::Alloc(ns);} inline void Dealloc(){T::Dealloc();} static bool HasFaceColor() { return true; } @@ -439,9 +439,9 @@ public: const ColorType &WC(const int i) const { return _color[i]; } const ColorType &cWC(const int i) const { return _color[i]; } - template - void ImportLocal(const LeftF & leftF){ for (int i=0; i<3; ++i) { WC(i) = leftF.cWC(i); } T::ImportLocal(leftF);} - static bool HasFaceColor() { return true; } + template + void ImportLocal(const RightF & rightF){ if (RightF::HasWedgeColor()) { for (int i=0; i<3; ++i) { WC(i) = rightF.cWC(i); } T::ImportLocal(rightF); } } + static bool HasWedgeColor() { return true; } static void Name(std::vector & name){name.push_back(std::string("WedgeColor"));T::Name(name);} private: @@ -467,8 +467,8 @@ public: typedef A QualityType; QualityType &Q() { return _quality; } const QualityType &cQ() const { return _quality; } - template - void ImportLocal(const LeftF & leftF){ Q() = leftF.cQ();T::ImportLocal(leftF);} + template + void ImportLocal(const RightF & rightF){ Q() = rightF.cQ();T::ImportLocal(rightF);} inline void Alloc(const int & ns){T::Alloc(ns);} inline void Dealloc(){T::Dealloc();} static bool HasFaceQuality() { return true; } @@ -496,8 +496,8 @@ public: inline void InitIMark() { _imark = 0; } inline int & IMark() { return _imark;} inline const int & IMark() const {return _imark;} - template - void ImportLocal(const LeftF & leftF){ IMark() = leftF.IMark();T::ImportLocal(leftF);} + template + void ImportLocal(const RightF & rightF){ IMark() = rightF.IMark();T::ImportLocal(rightF);} static void Name(std::vector & name){name.push_back(std::string("Mark"));T::Name(name);} private: @@ -521,8 +521,8 @@ public: char &FFi(const int j){(void)j; static char z=0; assert(0); return z;}; const char &cVFi(const int j){(void)j; static char z=0; return z;}; const char &cFFi(const int j){(void)j; static char z=0; return z;}; - template - void ImportLocal(const LeftF & leftF){ T::ImportLocal(leftF);} + template + void ImportLocal(const RightF & rightF){ T::ImportLocal(rightF);} inline void Alloc(const int & ns){T::Alloc(ns);} inline void Dealloc(){T::Dealloc();} static bool HasVFAdjacency() { return false; } @@ -548,8 +548,8 @@ public: typename T::FacePointer const VFp(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]; } - template - void ImportLocal(const LeftF & leftF){T::ImportLocal(leftF);} + template + void ImportLocal(const RightF & rightF){T::ImportLocal(rightF);} inline void Alloc(const int & ns){T::Alloc(ns);} inline void Dealloc(){T::Dealloc();} static bool HasVFAdjacency() { return true; } @@ -581,8 +581,8 @@ public: typename T::FacePointer const FFp1( const int j ) const { return FFp((j+1)%3);} typename T::FacePointer const FFp2( const int j ) const { return FFp((j+2)%3);} - template - void ImportLocal(const LeftF & leftF){T::ImportLocal(leftF);} + template + void ImportLocal(const RightF & rightF){T::ImportLocal(rightF);} inline void Alloc(const int & ns){T::Alloc(ns);} inline void Dealloc(){T::Dealloc();} static bool HasFFAdjacency() { return true; } @@ -615,8 +615,8 @@ public: typename T::FacePointer const FEp1( const int j ) const { return FEp((j+1)%3);} typename T::FacePointer const FEp2( const int j ) const { return FEp((j+2)%3);} - template - void ImportLocal(const LeftF & leftF){T::ImportLocal(leftF);} + template + void ImportLocal(const RightF & rightF){T::ImportLocal(rightF);} inline void Alloc(const int & ns){T::Alloc(ns);} inline void Dealloc(){T::Dealloc();} static bool HasFEAdjacency() { return true; }