diff --git a/vcg/complex/trimesh/refine.h b/vcg/complex/trimesh/refine.h index dfd2b1d9..6bfbfd12 100644 --- a/vcg/complex/trimesh/refine.h +++ b/vcg/complex/trimesh/refine.h @@ -1,4 +1,4 @@ -/**************************************************************************** +/***********F***************************************************************** * VCGLib o o * * Visual and Computer Graphics Library o o * * _ O _ * @@ -24,6 +24,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.15 2007/01/18 18:15:14 cignoni +added missing typenames + Revision 1.14 2007/01/17 14:31:47 giec Added TrSplit function. @@ -77,7 +80,7 @@ first working version #include #include #include -#include +#include #include #include #include @@ -149,9 +152,9 @@ struct MidPoint : public std::unary_function - TCoord2 WedgeInterp(TCoord2 &t0, TCoord2 &t1) + TexCoord2 WedgeInterp(TexCoord2 &t0, TexCoord2 &t1) { - TCoord2 tmp; + TexCoord2 tmp; assert(t0.n()== t1.n()); tmp.n()=t0.n(); tmp.t()=(t0.t()+t1.t())/2.0; @@ -209,9 +212,9 @@ struct MidPointArc : public std::unary_function - TCoord2 WedgeInterp(TCoord2 &t0, TCoord2 &t1) + TexCoord2 WedgeInterp(TexCoord2 &t0, TexCoord2 &t1) { - TCoord2 tmp; + TexCoord2 tmp; assert(t0.n()== t1.n()); tmp.n()=t0.n(); tmp.t()=(t0.t()+t1.t())/2.0; @@ -434,7 +437,7 @@ bool RefineE(MESH_TYPE &m, MIDPOINT mid, EDGEPRED ep,bool RefineSelected=false, if(RefineSelected) (*nf[i]).SetS(); } - if(tri::HasPerWedgeTexture(m)) + if(tri::HasPerWedgeTexCoord(m)) for(i=0;i<3;++i) { wtt[i]=(*fi).WT(i); wtt[3+i]=mid.WedgeInterp((*fi).WT(i),(*fi).WT((i+1)%3)); @@ -445,7 +448,7 @@ bool RefineE(MESH_TYPE &m, MIDPOINT mid, EDGEPRED ep,bool RefineSelected=false, for(j=0;j<3;++j){ (*nf[i]).V(j)=&*vv[SplitTab[ind].TV[i][j]]; - if(tri::HasPerWedgeTexture(m)) //analogo ai vertici... + if(tri::HasPerWedgeTexCoord(m)) //analogo ai vertici... (*nf[i]).WT(j)=wtt[SplitTab[ind].TV[i][j]]; assert((*nf[i]).V(j)!=0); @@ -464,7 +467,7 @@ bool RefineE(MESH_TYPE &m, MIDPOINT mid, EDGEPRED ep,bool RefineSelected=false, { // swap the last two triangles (*nf[2]).V(1)=(*nf[1]).V(0); (*nf[1]).V(1)=(*nf[2]).V(0); - if(tri::HasPerWedgeTexture(m)){ //analogo ai vertici... + if(tri::HasPerWedgeTexCoord(m)){ //analogo ai vertici... (*nf[2]).WT(1)=(*nf[1]).WT(0); (*nf[1]).WT(1)=(*nf[2]).WT(0); } @@ -568,9 +571,9 @@ struct MidPointButterfly : public std::unary_function - TCoord2 WedgeInterp(TCoord2 &t0, TCoord2 &t1) + TexCoord2 WedgeInterp(TexCoord2 &t0, TexCoord2 &t1) { - TCoord2 tmp; + TexCoord2 tmp; assert(t0.n()== t1.n()); tmp.n()=t0.n(); tmp.t()=(t0.t()+t1.t())/2.0; @@ -733,9 +736,9 @@ struct MidPointPlane : public std::unary_function - TCoord2 WedgeInterp(TCoord2 &t0, TCoord2 &t1) + TexCoord2 WedgeInterp(TexCoord2 &t0, TexCoord2 &t1) { - TCoord2 tmp; + TexCoord2 tmp; assert(t0.n()== t1.n()); tmp.n()=t0.n(); tmp.t()=(t0.t()+t1.t())/2.0; @@ -780,9 +783,9 @@ struct MidPointSphere : public std::unary_function - TCoord2 WedgeInterp(TCoord2 &t0, TCoord2 &t1) + TexCoord2 WedgeInterp(TexCoord2 &t0, TexCoord2 &t1) { - TCoord2 tmp; + TexCoord2 tmp; assert(t0.n()== t1.n()); tmp.n()=t0.n(); tmp.t()=(t0.t()+t1.t())/2.0; diff --git a/vcg/simplex/edge/base.h b/vcg/simplex/edge/base.h index 2fdeea63..8c0482c7 100644 --- a/vcg/simplex/edge/base.h +++ b/vcg/simplex/edge/base.h @@ -24,6 +24,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.11 2006/10/07 10:02:16 cignoni +Added missing typename for interp.parameters + Revision 1.10 2005/11/30 14:05:04 ponchio Fixed some UberZ fuynctions and non defined _flags @@ -60,7 +63,7 @@ created #define __VCGLIB__EDGE_TYPE_BASE #include -#include +#include namespace vcg { @@ -71,7 +74,7 @@ namespace vcg { This is the base class for definition of a face of the mesh. @param SVTYPE (Templete Parameter) Specifies the vertex class type. */ -template > class EDGE_TYPE +template > class EDGE_TYPE { public: /// The base type of the segment diff --git a/vcg/simplex/face/base.h b/vcg/simplex/face/base.h index 256369ff..12ef5fa0 100644 --- a/vcg/simplex/face/base.h +++ b/vcg/simplex/face/base.h @@ -24,6 +24,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.42 2007/02/20 14:07:53 ganovelli +added QualityType to comply faceplus type + Revision 1.41 2007/01/13 00:25:36 cignoni Added #ifdefs to guarantee that ComputeNormal would be defined only once @@ -154,7 +157,7 @@ First commit... #include #include -#include +#include #include #include #include @@ -176,7 +179,7 @@ class DUMMYTETRATYPE; * directory. Each file specify a class type with the desired fields. So for example * including 'vcg/simplex/face/with/FCFN.h' allow you to use the class FaceFCFN that has per-face color and normal stored inside. */ -template > class FACE_TYPE +template > class FACE_TYPE { public: /// The base type of the face @@ -1051,7 +1054,7 @@ static bool HasWedgeColor() { return false; #endif } -static bool HasWedgeTexture() { +static bool HasWedgeTexCoord() { #ifdef __VCGLIB_FACE_WT return true; #else diff --git a/vcg/simplex/face/with/afavfnfmrtfq.h b/vcg/simplex/face/with/afavfnfmrtfq.h index 33261c9c..33905a5e 100644 --- a/vcg/simplex/face/with/afavfnfmrtfq.h +++ b/vcg/simplex/face/with/afavfnfmrtfq.h @@ -20,4 +20,4 @@ #undef __VCGLIB_FACE_FM #undef __VCGLIB_FACE_RT #undef __VCGLIB_FACE_FQ -#endif \ No newline at end of file +#endif diff --git a/vcg/simplex/faceplus/base.h b/vcg/simplex/faceplus/base.h index 8fd3ca8b..39f5f9a9 100644 --- a/vcg/simplex/faceplus/base.h +++ b/vcg/simplex/faceplus/base.h @@ -24,6 +24,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.9 2007/02/12 19:01:23 ganovelli +added Name(std:vector& n) that fills n with the names of the attribute of the face type + Revision 1.8 2006/10/09 20:20:18 cignoni Increased the maximum number of possible template args from 8 to 9 @@ -60,7 +63,7 @@ First working version! #define __VCG_FACE_PLUS #include -#include +#include #include #include @@ -111,7 +114,7 @@ class FaceBase: public face::EmptyVertexRef< face::EmptyNormal< face::EmptyBitFlags< face::EmptyMark< - face::EmptyWedgeTexture< + face::EmptyWedgeTexCoord< FaceTypeHolder > > > > > > >{ }; @@ -331,7 +334,7 @@ A summary of the components that can be added to a face (see components.h for de VertexRef NormalFromVert, WedgeNormal Normal3s, Normal3f, Normal3d -WedgeTexture2s, WedgeTexture2f, WedgeTexture2d +WedgeTexCoord2s, WedgeTexCoord2f, WedgeTexCoord2d BitFlags WedgeColor, Color4b Qualitys, Qualityf, Qualityd diff --git a/vcg/simplex/faceplus/component.h b/vcg/simplex/faceplus/component.h index 62f578c5..e984db6d 100644 --- a/vcg/simplex/faceplus/component.h +++ b/vcg/simplex/faceplus/component.h @@ -24,6 +24,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.14 2007/02/27 09:32:00 cignoni +Added constructor to the VFadj component to comply to the allocator needs + Revision 1.13 2007/02/12 19:01:23 ganovelli added Name(std:vector& n) that fills n with the names of the attribute of the face type @@ -226,39 +229,39 @@ public: static void Name(std::vector & name){name.push_back(std::st }; -/*-------------------------- Texture ----------------------------------------*/ +/*-------------------------- TexCoord ----------------------------------------*/ -template class EmptyWedgeTexture: public TT { +template class EmptyWedgeTexCoord: public TT { public: - typedef int WedgeTextureType; - typedef vcg::TCoord2 TexCoordType; + typedef int WedgeTexCoordType; + typedef vcg::TexCoord2 TexCoordType; TexCoordType &WT(const int) { 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 HasWedgeTextureOcc() { return false; } + static bool HasWedgeTexCoord() { return false; } + static bool HasWedgeTexCoordOcc() { return false; } static void Name(std::vector & name){TT::Name(name);} }; -template class WedgeTexture: public TT { +template class WedgeTexCoord: public TT { public: - typedef int WedgeTextureType; + typedef int WedgeTexCoordType; typedef A TexCoordType; TexCoordType &WT(const int i) { return _wt[i]; } TexCoordType const &cWT(const int i) const { return _wt[i]; } - static bool HasWedgeTexture() { return true; } + static bool HasWedgeTexCoord() { return true; } static void Name(std::vector & name){name.push_back(std::string("WedgeTexture"));TT::Name(name);} private: TexCoordType _wt[3]; }; -template class WedgeTexture2s: public WedgeTexture, TT> { +template class WedgeTexCoord2s: public WedgeTexCoord, TT> { public: static void Name(std::vector & name){name.push_back(std::string("WedgeTexture2s"));TT::Name(name);} }; -template class WedgeTexture2f: public WedgeTexture, TT> { +template class WedgeTexCoord2f: public WedgeTexCoord, TT> { public: static void Name(std::vector & name){name.push_back(std::string("WedgeTexture2f"));TT::Name(name);} }; -template class WedgeTexture2d: public WedgeTexture, TT> { +template class WedgeTexCoord2d: public WedgeTexCoord, TT> { public: static void Name(std::vector & name){name.push_back(std::string("WedgeTexture2d"));TT::Name(name);} };