Texture coord name change! "TCoord" and "Texture" are BAD. "TexCoord" is GOOD.
This commit is contained in:
parent
22fd220c6f
commit
84946de883
|
@ -24,6 +24,10 @@
|
||||||
History
|
History
|
||||||
|
|
||||||
$Log: not supported by cvs2svn $
|
$Log: not supported by cvs2svn $
|
||||||
|
Revision 1.6 2005/09/14 14:09:16 spinelli
|
||||||
|
ConstVertexPointer --> VertexPointer
|
||||||
|
ConstEdgePointer --> EdgePointer
|
||||||
|
|
||||||
Revision 1.5 2005/05/17 21:19:37 ganovelli
|
Revision 1.5 2005/05/17 21:19:37 ganovelli
|
||||||
some std::and typename missing (CRS4)
|
some std::and typename missing (CRS4)
|
||||||
|
|
||||||
|
@ -149,7 +153,7 @@ static bool HasPerVertexNormal() { return VertexType::HasNormal() ; }
|
||||||
static bool HasPerVertexColor() { return VertexType::HasColor() ; }
|
static bool HasPerVertexColor() { return VertexType::HasColor() ; }
|
||||||
static bool HasPerVertexMark() { return VertexType::HasMark() ; }
|
static bool HasPerVertexMark() { return VertexType::HasMark() ; }
|
||||||
static bool HasPerVertexQuality() { return VertexType::HasQuality(); }
|
static bool HasPerVertexQuality() { return VertexType::HasQuality(); }
|
||||||
static bool HasPerVertexTexture() { return VertexType::HasTexture(); }
|
static bool HasPerVertexTexCoord(){ return VertexType::HasTexCoord(); }
|
||||||
|
|
||||||
static bool HasPerEdgeColor() { return EdgeType::HasEdgeColor() ; }
|
static bool HasPerEdgeColor() { return EdgeType::HasEdgeColor() ; }
|
||||||
static bool HasPerEdgeNormal() { return EdgeType::HasEdgeNormal() ; }
|
static bool HasPerEdgeNormal() { return EdgeType::HasEdgeNormal() ; }
|
||||||
|
|
|
@ -24,6 +24,9 @@
|
||||||
History
|
History
|
||||||
|
|
||||||
$Log: not supported by cvs2svn $
|
$Log: not supported by cvs2svn $
|
||||||
|
Revision 1.12 2005/12/12 11:10:35 ganovelli
|
||||||
|
modifications to compile with gcc
|
||||||
|
|
||||||
Revision 1.11 2005/01/12 11:06:54 ganovelli
|
Revision 1.11 2005/01/12 11:06:54 ganovelli
|
||||||
added InitVertexIMark
|
added InitVertexIMark
|
||||||
|
|
||||||
|
@ -211,7 +214,7 @@ static bool HasPerVertexNormal() { return VertexType::HasNormal() ; }
|
||||||
static bool HasPerVertexColor() { return VertexType::HasColor() ; }
|
static bool HasPerVertexColor() { return VertexType::HasColor() ; }
|
||||||
static bool HasPerVertexMark() { return VertexType::HasMark() ; }
|
static bool HasPerVertexMark() { return VertexType::HasMark() ; }
|
||||||
static bool HasPerVertexQuality() { return VertexType::HasQuality(); }
|
static bool HasPerVertexQuality() { return VertexType::HasQuality(); }
|
||||||
static bool HasPerVertexTexture() { return VertexType::HasTexture(); }
|
static bool HasPerVertexTexCoord(){ return VertexType::HasTexCoord(); }
|
||||||
|
|
||||||
static bool HasPerTetraNormal() { return TetraType::HasTetraNormal() ; }
|
static bool HasPerTetraNormal() { return TetraType::HasTetraNormal() ; }
|
||||||
static bool HasPerTetraMark() { return TetraType::HasTetraMark() ; }
|
static bool HasPerTetraMark() { return TetraType::HasTetraMark() ; }
|
||||||
|
|
|
@ -24,6 +24,9 @@
|
||||||
History
|
History
|
||||||
|
|
||||||
$Log: not supported by cvs2svn $
|
$Log: not supported by cvs2svn $
|
||||||
|
Revision 1.5 2006/05/25 04:40:57 cignoni
|
||||||
|
Updated HasPerFaceColor/Quality to the new style with mesh param.
|
||||||
|
|
||||||
Revision 1.4 2006/04/11 13:51:21 zifnab1974
|
Revision 1.4 2006/04/11 13:51:21 zifnab1974
|
||||||
commented out one function which does not compile on linux with gcc 3.4.5
|
commented out one function which does not compile on linux with gcc 3.4.5
|
||||||
|
|
||||||
|
@ -83,7 +86,7 @@ static void ImportVertex(VertexLeft &vl, VertexRight &vr)
|
||||||
vl.P().Import(vr.P());
|
vl.P().Import(vr.P());
|
||||||
if(vl.HasColor() && vl.HasColor()) vl.C()=vr.C();
|
if(vl.HasColor() && vl.HasColor()) vl.C()=vr.C();
|
||||||
if(vl.HasQuality() && vl.HasQuality()) vl.Q()=vr.Q();
|
if(vl.HasQuality() && vl.HasQuality()) vl.Q()=vr.Q();
|
||||||
if(vl.HasTexture() && vl.HasTexture()) vl.T()=vr.T();
|
if(vl.HasTexCoord() && vl.HasTexCoord()) vl.T()=vr.T();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ImportFace(MeshLeft &ml, MeshRight &mr, FaceLeft &fl, FaceRight &fr, std::vector<int> &remap)
|
static void ImportFace(MeshLeft &ml, MeshRight &mr, FaceLeft &fl, FaceRight &fr, std::vector<int> &remap)
|
||||||
|
@ -93,7 +96,7 @@ static void ImportFace(MeshLeft &ml, MeshRight &mr, FaceLeft &fl, FaceRight &fr,
|
||||||
fl.V(2)=&ml.vert[remap[ Index(mr,fr.V(2))]];
|
fl.V(2)=&ml.vert[remap[ Index(mr,fr.V(2))]];
|
||||||
if(HasPerFaceColor(mr) && HasPerFaceColor(ml)) fl.C()=fr.C();
|
if(HasPerFaceColor(mr) && HasPerFaceColor(ml)) fl.C()=fr.C();
|
||||||
if(HasPerFaceQuality(mr) && HasPerFaceQuality(ml)) fl.Q()=fr.Q();
|
if(HasPerFaceQuality(mr) && HasPerFaceQuality(ml)) fl.Q()=fr.Q();
|
||||||
if(HasPerWedgeTexture(mr) && HasPerWedgeTexture(ml))
|
if(HasPerWedgeTexCoord(mr) && HasPerWedgeTexCoord(ml))
|
||||||
{
|
{
|
||||||
fl.WT(0)=fr.WT(0);
|
fl.WT(0)=fr.WT(0);
|
||||||
fl.WT(1)=fr.WT(1);
|
fl.WT(1)=fr.WT(1);
|
||||||
|
|
|
@ -24,6 +24,9 @@
|
||||||
History
|
History
|
||||||
|
|
||||||
$Log: not supported by cvs2svn $
|
$Log: not supported by cvs2svn $
|
||||||
|
Revision 1.27 2007/02/22 09:18:41 cignoni
|
||||||
|
Added guards on msvc pragmas
|
||||||
|
|
||||||
Revision 1.26 2007/02/14 15:31:41 ganovelli
|
Revision 1.26 2007/02/14 15:31:41 ganovelli
|
||||||
Added HasPerVertexFlag
|
Added HasPerVertexFlag
|
||||||
|
|
||||||
|
@ -224,7 +227,7 @@ static bool HasPerVertexNormal() { return VertexType::HasNormal() ; }
|
||||||
static bool HasPerVertexColor() { return VertexType::HasColor() ; }
|
static bool HasPerVertexColor() { return VertexType::HasColor() ; }
|
||||||
static bool HasPerVertexMark() { return VertexType::HasMark() ; }
|
static bool HasPerVertexMark() { return VertexType::HasMark() ; }
|
||||||
static bool HasPerVertexQuality() { return VertexType::HasQuality(); }
|
static bool HasPerVertexQuality() { return VertexType::HasQuality(); }
|
||||||
static bool HasPerVertexTexture() { return VertexType::HasTexture(); }
|
static bool HasPerVertexTexCoord(){ return VertexType::HasTexCoord(); }
|
||||||
static bool HasPerVertexFlags() { return VertexType::HasFlags(); }
|
static bool HasPerVertexFlags() { return VertexType::HasFlags(); }
|
||||||
|
|
||||||
static bool HasPerFaceColor() { return FaceType::HasFaceColor() ; }
|
static bool HasPerFaceColor() { return FaceType::HasFaceColor() ; }
|
||||||
|
@ -237,7 +240,7 @@ static bool HasPerWedgeColor() { return FaceType::HasWedgeColor() ; }
|
||||||
static bool HasPerWedgeNormal() { return FaceType::HasWedgeNormal() ; }
|
static bool HasPerWedgeNormal() { return FaceType::HasWedgeNormal() ; }
|
||||||
static bool HasPerWedgeMark() { return FaceType::HasWedgeMark() ; }
|
static bool HasPerWedgeMark() { return FaceType::HasWedgeMark() ; }
|
||||||
static bool HasPerWedgeQuality() { return FaceType::HasWedgeQuality(); }
|
static bool HasPerWedgeQuality() { return FaceType::HasWedgeQuality(); }
|
||||||
static bool HasPerWedgeTexture() { return FaceType::HasWedgeTexture(); }
|
static bool HasPerWedgeTexCoord() { return FaceType::HasWedgeTexCoord(); }
|
||||||
|
|
||||||
static bool HasFFTopology() { return FaceType::HasFFAdjacency(); }
|
static bool HasFFTopology() { return FaceType::HasFFAdjacency(); }
|
||||||
static bool HasVFTopology() { return ((FaceType::HasVFAdjacency())&&(VertexType::HasVFAdjacency())); }
|
static bool HasVFTopology() { return ((FaceType::HasVFAdjacency())&&(VertexType::HasVFAdjacency())); }
|
||||||
|
@ -334,7 +337,7 @@ template < class VertContainerType, class FaceContainerType >
|
||||||
bool HasPerVertexFlags (const TriMesh < VertContainerType , FaceContainerType> & /*m*/) {return VertContainerType::value_type::HasFlags();}
|
bool HasPerVertexFlags (const TriMesh < VertContainerType , FaceContainerType> & /*m*/) {return VertContainerType::value_type::HasFlags();}
|
||||||
|
|
||||||
template < class VertContainerType, class FaceContainerType >
|
template < class VertContainerType, class FaceContainerType >
|
||||||
bool HasPerWedgeTexture (const TriMesh < VertContainerType , FaceContainerType> & /*m*/) {return FaceContainerType::value_type::HasWedgeTexture();}
|
bool HasPerWedgeTexCoord (const TriMesh < VertContainerType , FaceContainerType> & /*m*/) {return FaceContainerType::value_type::HasWedgeTexCoord();}
|
||||||
|
|
||||||
template < class VertContainerType, class FaceContainerType >
|
template < class VertContainerType, class FaceContainerType >
|
||||||
bool HasPerFaceFlags (const TriMesh < VertContainerType , FaceContainerType> & /*m*/) {return FaceContainerType::value_type::HasFlags();}
|
bool HasPerFaceFlags (const TriMesh < VertContainerType , FaceContainerType> & /*m*/) {return FaceContainerType::value_type::HasFlags();}
|
||||||
|
|
|
@ -24,6 +24,10 @@
|
||||||
History
|
History
|
||||||
|
|
||||||
$Log: not supported by cvs2svn $
|
$Log: not supported by cvs2svn $
|
||||||
|
Revision 1.49 2007/02/27 15:17:17 marfr960
|
||||||
|
std::numeric_limits<ScalarType>::max() -> (std::numeric_limits<ScalarType>::max)()
|
||||||
|
to avoid annoying misunderstaindings on msvc8
|
||||||
|
|
||||||
Revision 1.48 2007/01/11 10:12:19 cignoni
|
Revision 1.48 2007/01/11 10:12:19 cignoni
|
||||||
Removed useless and conflicting inclusion of face.h
|
Removed useless and conflicting inclusion of face.h
|
||||||
|
|
||||||
|
@ -978,7 +982,7 @@ private:
|
||||||
for (FaceIterator fi = m.face.begin(); fi != m.face.end(); ++fi) if(!(*fi).IsD())
|
for (FaceIterator fi = m.face.begin(); fi != m.face.end(); ++fi) if(!(*fi).IsD())
|
||||||
{
|
{
|
||||||
face::SwapEdge<FaceType,false>((*fi), 0);
|
face::SwapEdge<FaceType,false>((*fi), 0);
|
||||||
if (HasPerWedgeTexture(m))
|
if (HasPerWedgeTexCoord(m))
|
||||||
swap((*fi).WT(0),(*fi).WT(1));
|
swap((*fi).WT(0),(*fi).WT(1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,6 +24,9 @@
|
||||||
History
|
History
|
||||||
|
|
||||||
$Log: not supported by cvs2svn $
|
$Log: not supported by cvs2svn $
|
||||||
|
Revision 1.5 2006/08/23 16:49:25 marfr960
|
||||||
|
added typedef VertContainer VertexContainer to avoid inconsistency with pre-existing methods
|
||||||
|
|
||||||
Revision 1.4 2006/08/23 15:32:24 marfr960
|
Revision 1.4 2006/08/23 15:32:24 marfr960
|
||||||
added bbox of the mesh
|
added bbox of the mesh
|
||||||
vn int->size_t
|
vn int->size_t
|
||||||
|
@ -127,7 +130,7 @@ static bool HasPerVertexNormal() { return VertexType::HasNormal() ; }
|
||||||
static bool HasPerVertexColor() { return VertexType::HasColor() ; }
|
static bool HasPerVertexColor() { return VertexType::HasColor() ; }
|
||||||
static bool HasPerVertexMark() { return VertexType::HasMark() ; }
|
static bool HasPerVertexMark() { return VertexType::HasMark() ; }
|
||||||
static bool HasPerVertexQuality() { return VertexType::HasQuality(); }
|
static bool HasPerVertexQuality() { return VertexType::HasQuality(); }
|
||||||
static bool HasPerVertexTexture() { return VertexType::HasTexture(); }
|
static bool HasPerVertexTexCoord(){ return VertexType::HasTexCoord(); }
|
||||||
|
|
||||||
/// Initialize the imark-system of the faces
|
/// Initialize the imark-system of the faces
|
||||||
void InitPointIMark()
|
void InitPointIMark()
|
||||||
|
|
|
@ -24,6 +24,9 @@
|
||||||
History
|
History
|
||||||
|
|
||||||
$Log: not supported by cvs2svn $
|
$Log: not supported by cvs2svn $
|
||||||
|
Revision 1.15 2007/03/12 15:37:19 tarini
|
||||||
|
Texture coord name change! "TCoord" and "Texture" are BAD. "TexCoord" is GOOD.
|
||||||
|
|
||||||
Revision 1.14 2007/02/27 09:32:00 cignoni
|
Revision 1.14 2007/02/27 09:32:00 cignoni
|
||||||
Added constructor to the VFadj component to comply to the allocator needs
|
Added constructor to the VFadj component to comply to the allocator needs
|
||||||
|
|
||||||
|
@ -249,20 +252,20 @@ public:
|
||||||
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]; }
|
||||||
static bool HasWedgeTexCoord() { return true; }
|
static bool HasWedgeTexCoord() { return true; }
|
||||||
static void Name(std::vector<std::string> & name){name.push_back(std::string("WedgeTexture"));TT::Name(name);}
|
static void Name(std::vector<std::string> & name){name.push_back(std::string("WedgeTexCoord"));TT::Name(name);}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
TexCoordType _wt[3];
|
TexCoordType _wt[3];
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class TT> class WedgeTexCoord2s: public WedgeTexCoord<TexCoord2<short,1>, TT> {
|
template <class TT> class WedgeTexCoord2s: public WedgeTexCoord<TexCoord2<short,1>, TT> {
|
||||||
public: static void Name(std::vector<std::string> & name){name.push_back(std::string("WedgeTexture2s"));TT::Name(name);}
|
public: static void Name(std::vector<std::string> & name){name.push_back(std::string("WedgeTexCoord2s"));TT::Name(name);}
|
||||||
};
|
};
|
||||||
template <class TT> class WedgeTexCoord2f: public WedgeTexCoord<TexCoord2<float,1>, TT> {
|
template <class TT> class WedgeTexCoord2f: public WedgeTexCoord<TexCoord2<float,1>, TT> {
|
||||||
public: static void Name(std::vector<std::string> & name){name.push_back(std::string("WedgeTexture2f"));TT::Name(name);}
|
public: static void Name(std::vector<std::string> & name){name.push_back(std::string("WedgeTexCoord2f"));TT::Name(name);}
|
||||||
};
|
};
|
||||||
template <class TT> class WedgeTexCoord2d: public WedgeTexCoord<TexCoord2<double,1>, TT> {
|
template <class TT> class WedgeTexCoord2d: public WedgeTexCoord<TexCoord2<double,1>, TT> {
|
||||||
public: static void Name(std::vector<std::string> & name){name.push_back(std::string("WedgeTexture2d"));TT::Name(name);}
|
public: static void Name(std::vector<std::string> & name){name.push_back(std::string("WedgeTexCoord2d"));TT::Name(name);}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*------------------------- FLAGS -----------------------------------------*/
|
/*------------------------- FLAGS -----------------------------------------*/
|
||||||
|
|
|
@ -24,6 +24,9 @@
|
||||||
History
|
History
|
||||||
|
|
||||||
$Log: not supported by cvs2svn $
|
$Log: not supported by cvs2svn $
|
||||||
|
Revision 1.5 2007/01/18 01:29:48 cignoni
|
||||||
|
commented UberP access method (syntax errors)
|
||||||
|
|
||||||
Revision 1.4 2006/12/04 10:59:15 ganovelli
|
Revision 1.4 2006/12/04 10:59:15 ganovelli
|
||||||
aggiunte funzioni di override per Has*
|
aggiunte funzioni di override per Has*
|
||||||
|
|
||||||
|
@ -56,17 +59,17 @@ compare with OCF(Optional Component Fast)
|
||||||
namespace vcg {
|
namespace vcg {
|
||||||
namespace face {
|
namespace face {
|
||||||
|
|
||||||
///*-------------------------- WedgeTextureOcc ----------------------------------------*/
|
///*-------------------------- WedgeTexCoordOcc ----------------------------------------*/
|
||||||
|
|
||||||
template <class A, class T> class WedgeTextureOcc: public T {
|
template <class A, class T> class WedgeTexCoordOcc: public T {
|
||||||
public:
|
public:
|
||||||
typedef A WedgeTextureType;
|
typedef A WedgeTexCoordType;
|
||||||
WedgeTextureType &WT(const int&i) {return CAT< vector_occ<FaceType>,WedgeTextureType>::Instance()->Get((FaceType*)this);}
|
WedgeTexCoordType &WT(const int&i) {return CAT< vector_occ<FaceType>,WedgeTexCoordType>::Instance()->Get((FaceType*)this);}
|
||||||
static bool HasWedgeTexture() { return true; }
|
static bool HasWedgeTexCoord() { return true; }
|
||||||
static bool HasWedgeTextureOcc() { return true; }
|
static bool HasWedgeTexCoordOcc() { return true; }
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class T> class WedgeTexturefOcc: public WedgeTextureOcc<TCoord2<float,1>, T> {};
|
template <class T> class WedgeTexCoordfOcc: public WedgeTexCoordOcc<TexCoord2<float,1>, T> {};
|
||||||
|
|
||||||
///*-------------------------- FACEINFO ----------------------------------------*/
|
///*-------------------------- FACEINFO ----------------------------------------*/
|
||||||
|
|
||||||
|
@ -282,10 +285,10 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
template < class VertContainerType, class FaceType >
|
template < class VertContainerType, class FaceType >
|
||||||
bool HasPerWedgeTexture (const TriMesh < VertContainerType , vector_occ< FaceType > > & m)
|
bool HasPerWedgeTexCoord (const TriMesh < VertContainerType , vector_occ< FaceType > > & m)
|
||||||
{
|
{
|
||||||
if(FaceType::HasWedgeTextureOcc()) return m.face.IsEnabledAttribute<FaceType::WedgeTextureType >();
|
if(FaceType::HasWedgeTexCoordOcc()) return m.face.IsEnabledAttribute<FaceType::WedgeTexCoordType >();
|
||||||
else return FaceType::FaceType::HasWedgeTexture();
|
else return FaceType::FaceType::HasWedgeTexCoord();
|
||||||
}
|
}
|
||||||
|
|
||||||
template < class VertContainerType, class FaceType >
|
template < class VertContainerType, class FaceType >
|
||||||
|
|
|
@ -24,6 +24,10 @@
|
||||||
History
|
History
|
||||||
|
|
||||||
$Log: not supported by cvs2svn $
|
$Log: not supported by cvs2svn $
|
||||||
|
Revision 1.19 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.18 2006/11/07 11:29:24 cignoni
|
Revision 1.18 2006/11/07 11:29:24 cignoni
|
||||||
Corrected some errors in the reflections Has*** functions
|
Corrected some errors in the reflections Has*** functions
|
||||||
|
|
||||||
|
@ -278,13 +282,13 @@ void DisableFFAdjacency() {
|
||||||
|
|
||||||
bool IsWedgeTexEnabled() const {return WedgeTexEnabled;}
|
bool IsWedgeTexEnabled() const {return WedgeTexEnabled;}
|
||||||
void EnableWedgeTex() {
|
void EnableWedgeTex() {
|
||||||
assert(VALUE_TYPE::HasWedgeTextureOcf());
|
assert(VALUE_TYPE::HasWedgeTexCoordOcf());
|
||||||
WedgeTexEnabled=true;
|
WedgeTexEnabled=true;
|
||||||
WTV.resize((*this).size(),WedgeTexTypePack());
|
WTV.resize((*this).size(),WedgeTexTypePack());
|
||||||
}
|
}
|
||||||
|
|
||||||
void DisableWedgeTex() {
|
void DisableWedgeTex() {
|
||||||
assert(VALUE_TYPE::HasWedgeTextureOcf());
|
assert(VALUE_TYPE::HasWedgeTexCoordOcf());
|
||||||
WedgeTexEnabled=false;
|
WedgeTexEnabled=false;
|
||||||
WTV.clear();
|
WTV.clear();
|
||||||
}
|
}
|
||||||
|
@ -423,17 +427,17 @@ public:
|
||||||
|
|
||||||
///*-------------------------- WEDGE TEXCOORD ----------------------------------*/
|
///*-------------------------- WEDGE TEXCOORD ----------------------------------*/
|
||||||
|
|
||||||
template <class A, class TT> class WedgeTextureOcf: public TT {
|
template <class A, class TT> class WedgeTexCoordOcf: public TT {
|
||||||
public:
|
public:
|
||||||
WedgeTextureOcf(){ }
|
WedgeTexCoordOcf(){ }
|
||||||
typedef A TexCoordType;
|
typedef A TexCoordType;
|
||||||
TexCoordType &WT(const int i) { assert((*this).Base().WedgeTexEnabled); return (*this).Base().WTV[(*this).Index()].wt[i]; }
|
TexCoordType &WT(const int i) { assert((*this).Base().WedgeTexEnabled); return (*this).Base().WTV[(*this).Index()].wt[i]; }
|
||||||
TexCoordType const &cWT(const int i) const { assert((*this).Base().WedgeTexEnabled); return (*this).Base().WTV[(*this).Index()].wt[i]; }
|
TexCoordType const &cWT(const int i) const { assert((*this).Base().WedgeTexEnabled); return (*this).Base().WTV[(*this).Index()].wt[i]; }
|
||||||
static bool HasWedgeTexture() { return true; }
|
static bool HasWedgeTexCoord() { return true; }
|
||||||
static bool HasWedgeTextureOcf() { return true; }
|
static bool HasWedgeTexCoordOcf() { return true; }
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class T> class WedgeTexturefOcf: public WedgeTextureOcf<TCoord2<float,1>, T> {};
|
template <class T> class WedgeTexCoordfOcf: public WedgeTexCoordOcf<TexCoord2<float,1>, T> {};
|
||||||
|
|
||||||
///*-------------------------- InfoOpt ----------------------------------*/
|
///*-------------------------- InfoOpt ----------------------------------*/
|
||||||
|
|
||||||
|
@ -444,7 +448,7 @@ public:
|
||||||
static bool HasFaceColorOcf() { return false; }
|
static bool HasFaceColorOcf() { return false; }
|
||||||
static bool HasFaceNormalOcf() { return false; }
|
static bool HasFaceNormalOcf() { return false; }
|
||||||
static bool HasFaceMarkOcf() { return false; }
|
static bool HasFaceMarkOcf() { return false; }
|
||||||
static bool HasWedgeTextureOcf() { return false; }
|
static bool HasWedgeTexCoordOcf() { return false; }
|
||||||
static bool HasFFAdjacencyOcf() { return false; }
|
static bool HasFFAdjacencyOcf() { return false; }
|
||||||
static bool HasVFAdjacencyOcf() { return false; }
|
static bool HasVFAdjacencyOcf() { return false; }
|
||||||
|
|
||||||
|
@ -481,10 +485,10 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
template < class VertContainerType, class FaceType >
|
template < class VertContainerType, class FaceType >
|
||||||
bool HasPerWedgeTexture (const TriMesh < VertContainerType , face::vector_ocf< FaceType > > & m)
|
bool HasPerWedgeTexCoord (const TriMesh < VertContainerType , face::vector_ocf< FaceType > > & m)
|
||||||
{
|
{
|
||||||
if(FaceType::HasWedgeTextureOcf()) return m.face.IsWedgeTexEnabled();
|
if(FaceType::HasWedgeTexCoordOcf()) return m.face.IsWedgeTexEnabled();
|
||||||
else return FaceType::HasWedgeTexture();
|
else return FaceType::HasWedgeTexCoord();
|
||||||
}
|
}
|
||||||
|
|
||||||
template < class VertContainerType, class FaceType >
|
template < class VertContainerType, class FaceType >
|
||||||
|
|
|
@ -23,6 +23,9 @@
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
History
|
History
|
||||||
$Log: not supported by cvs2svn $
|
$Log: not supported by cvs2svn $
|
||||||
|
Revision 1.30 2007/02/26 14:21:44 turini
|
||||||
|
VTb moved to VTp
|
||||||
|
|
||||||
Revision 1.29 2007/02/20 14:08:34 ganovelli
|
Revision 1.29 2007/02/20 14:08:34 ganovelli
|
||||||
added QualityType to comply vertexplus type
|
added QualityType to comply vertexplus type
|
||||||
|
|
||||||
|
@ -79,6 +82,9 @@ Revision 1.12 2004/05/10 13:31:13 ganovelli
|
||||||
function for edge adjacency added
|
function for edge adjacency added
|
||||||
|
|
||||||
$Log: not supported by cvs2svn $
|
$Log: not supported by cvs2svn $
|
||||||
|
Revision 1.30 2007/02/26 14:21:44 turini
|
||||||
|
VTb moved to VTp
|
||||||
|
|
||||||
Revision 1.29 2007/02/20 14:08:34 ganovelli
|
Revision 1.29 2007/02/20 14:08:34 ganovelli
|
||||||
added QualityType to comply vertexplus type
|
added QualityType to comply vertexplus type
|
||||||
|
|
||||||
|
@ -176,7 +182,7 @@ Edited Comments and GPL license
|
||||||
|
|
||||||
#include<vcg/space/point3.h>
|
#include<vcg/space/point3.h>
|
||||||
#include<vcg/space/color4.h>
|
#include<vcg/space/color4.h>
|
||||||
#include<vcg/space/tcoord2.h>
|
#include<vcg/space/texcoord2.h>
|
||||||
#include<vcg/simplex/face/pos.h>
|
#include<vcg/simplex/face/pos.h>
|
||||||
#include<vcg/space/box3.h>
|
#include<vcg/space/box3.h>
|
||||||
|
|
||||||
|
@ -195,7 +201,7 @@ namespace vcg {
|
||||||
* directory. Each file specify a class type with the desired fields. So for example
|
* directory. Each file specify a class type with the desired fields. So for example
|
||||||
* including 'vcg/simplex/vertex/with/VCVN.h' allow you to use the class VertVCVN that has per-vertex color and normal stored inside.
|
* including 'vcg/simplex/vertex/with/VCVN.h' allow you to use the class VertVCVN that has per-vertex color and normal stored inside.
|
||||||
*/
|
*/
|
||||||
template <class FLTYPE, class VETYPE = DUMMYEDGETYPE, class VFTYPE = DUMMYFACETYPE, class VTTYPE = DUMMYTETRATYPE,class TCTYPE = TCoord2<float,1>, class CoordTYPE= Point3<FLTYPE> >
|
template <class FLTYPE, class VETYPE = DUMMYEDGETYPE, class VFTYPE = DUMMYFACETYPE, class VTTYPE = DUMMYTETRATYPE,class TCTYPE = TexCoord2<float,1>, class CoordTYPE= Point3<FLTYPE> >
|
||||||
class VERTEX_TYPE
|
class VERTEX_TYPE
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -867,7 +873,7 @@ static bool HasQuality() {
|
||||||
return false;
|
return false;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
static bool HasTexture() {
|
static bool HasTexCoord() {
|
||||||
#ifdef __VCGLIB_VERTEX_VT
|
#ifdef __VCGLIB_VERTEX_VT
|
||||||
return true;
|
return true;
|
||||||
#else
|
#else
|
||||||
|
@ -918,7 +924,7 @@ inline void Convert( VERT_TYPE &v )
|
||||||
#endif
|
#endif
|
||||||
if ((HasQuality())&&(v.HasQuality()))
|
if ((HasQuality())&&(v.HasQuality()))
|
||||||
Q()=v.Q();
|
Q()=v.Q();
|
||||||
if ((HasTexture())&&(v.HasTexture()))
|
if ((HasTexCoord())&&(v.HasTexCoord()))
|
||||||
T()=v.T();
|
T()=v.T();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
|
|
||||||
namespace vcg {
|
namespace vcg {
|
||||||
template < class VETYPE, class VFTYPE, class VTTYPE,class TCTYPE = TCoord2<float,1>, class CoordTYPE= Point3<float> >
|
template < class VETYPE, class VFTYPE, class VTTYPE,class TCTYPE = TexCoord2<float,1>, class CoordTYPE= Point3<float> >
|
||||||
class Vertexf : public Vertex<float,VETYPE,VFTYPE,VTTYPE, TCTYPE , CoordTYPE> {};
|
class Vertexf : public Vertex<float,VETYPE,VFTYPE,VTTYPE, TCTYPE , CoordTYPE> {};
|
||||||
|
|
||||||
template < class VETYPE, class VFTYPE, class VTTYPE>
|
template < class VETYPE, class VFTYPE, class VTTYPE>
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
namespace vcg {
|
namespace vcg {
|
||||||
|
|
||||||
template < class VETYPE, class VFTYPE, class VTTYPE,class TCTYPE = TCoord2<float,1>, class CoordTYPE= Point3<float> >
|
template < class VETYPE, class VFTYPE, class VTTYPE,class TCTYPE = TexCoord2<float,1>, class CoordTYPE= Point3<float> >
|
||||||
class VertexATVMVNf : public VertexATVMVN<float,VETYPE,VFTYPE,VTTYPE,TCTYPE,CoordTYPE> {};
|
class VertexATVMVNf : public VertexATVMVN<float,VETYPE,VFTYPE,VTTYPE,TCTYPE,CoordTYPE> {};
|
||||||
|
|
||||||
template < class VETYPE, class VFTYPE, class VTTYPE>
|
template < class VETYPE, class VFTYPE, class VTTYPE>
|
||||||
|
|
|
@ -24,6 +24,9 @@
|
||||||
History
|
History
|
||||||
|
|
||||||
$Log: not supported by cvs2svn $
|
$Log: not supported by cvs2svn $
|
||||||
|
Revision 1.9 2007/02/12 19:00:56 ganovelli
|
||||||
|
added Name(std:vector<std::string>& n) that fills n with the names of the attribute of the vertex type
|
||||||
|
|
||||||
Revision 1.8 2006/09/28 17:34:11 cignoni
|
Revision 1.8 2006/09/28 17:34:11 cignoni
|
||||||
Added Missing GetBBox function
|
Added Missing GetBBox function
|
||||||
|
|
||||||
|
@ -54,7 +57,7 @@ First working version!
|
||||||
#define __VCG_VERTEX_PLUS
|
#define __VCG_VERTEX_PLUS
|
||||||
|
|
||||||
#include <vcg/space/point3.h>
|
#include <vcg/space/point3.h>
|
||||||
#include <vcg/space/tcoord2.h>
|
#include <vcg/space/texcoord2.h>
|
||||||
#include <vcg/space/color4.h>
|
#include <vcg/space/color4.h>
|
||||||
#include <vcg/simplex/vertexplus/component.h>
|
#include <vcg/simplex/vertexplus/component.h>
|
||||||
|
|
||||||
|
@ -98,7 +101,7 @@ we have to build the type a step a time (deriving from a single ancestor at a ti
|
||||||
|
|
||||||
*/
|
*/
|
||||||
template <class BVT, class BET=DumET, class BFT=DumFT, class BTT=DumTT>
|
template <class BVT, class BET=DumET, class BFT=DumFT, class BTT=DumTT>
|
||||||
class VertexBase: public vert::EmptyTexture<
|
class VertexBase: public vert::EmptyTexCoord<
|
||||||
vert::EmptyVFAdj<
|
vert::EmptyVFAdj<
|
||||||
vert::EmptyColor<
|
vert::EmptyColor<
|
||||||
vert::EmptyQuality<
|
vert::EmptyQuality<
|
||||||
|
@ -272,7 +275,7 @@ Coord3f, Coord3d,
|
||||||
Normal3s, Normal3f, Normal3d
|
Normal3s, Normal3f, Normal3d
|
||||||
Mark //a int component (incremental mark)
|
Mark //a int component (incremental mark)
|
||||||
BitFlags
|
BitFlags
|
||||||
Texture2s, Texture2f, Texture2d
|
TexCoord2s, TexCoord2f, TexCoord2d
|
||||||
Color4b
|
Color4b
|
||||||
Qualitys, Qualityf, Qualityd
|
Qualitys, Qualityf, Qualityd
|
||||||
VFAdj //topology (vertex->face adjacency)
|
VFAdj //topology (vertex->face adjacency)
|
||||||
|
|
|
@ -24,6 +24,9 @@
|
||||||
History
|
History
|
||||||
|
|
||||||
$Log: not supported by cvs2svn $
|
$Log: not supported by cvs2svn $
|
||||||
|
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
|
Revision 1.20 2007/02/12 19:00:56 ganovelli
|
||||||
added Name(std:vector<std::string>& n) that fills n with the names of the attribute of the vertex type
|
added Name(std:vector<std::string>& n) that fills n with the names of the attribute of the vertex type
|
||||||
|
|
||||||
|
@ -93,7 +96,7 @@ First working version!
|
||||||
#define __VCG_VERTEX_PLUS_COMPONENT
|
#define __VCG_VERTEX_PLUS_COMPONENT
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <vcg/space/point3.h>
|
#include <vcg/space/point3.h>
|
||||||
#include <vcg/space/tcoord2.h>
|
#include <vcg/space/texcoord2.h>
|
||||||
#include <vcg/space/color4.h>
|
#include <vcg/space/color4.h>
|
||||||
|
|
||||||
namespace vcg {
|
namespace vcg {
|
||||||
|
@ -201,36 +204,36 @@ public:
|
||||||
int _imark;
|
int _imark;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*-------------------------- TEXTURE ----------------------------------------*/
|
/*-------------------------- TEXCOORD ----------------------------------------*/
|
||||||
|
|
||||||
template <class TT> class EmptyTexture: public TT {
|
template <class TT> class EmptyTexCoord: public TT {
|
||||||
public:
|
public:
|
||||||
typedef vcg::TCoord2<float,1> TextureType;
|
typedef vcg::TexCoord2<float,1> TexCoordType;
|
||||||
TextureType &T() { static TextureType dummy_texture; assert(0); return dummy_texture; }
|
TexCoordType &T() { static TexCoordType dummy_texcoord; assert(0); return dummy_texcoord; }
|
||||||
static bool HasTexture() { return false; }
|
static bool HasTexCoord() { return false; }
|
||||||
static void Name(std::vector<std::string> & name){TT::Name(name);}
|
static void Name(std::vector<std::string> & name){TT::Name(name);}
|
||||||
|
|
||||||
};
|
};
|
||||||
template <class A, class TT> class Texture: public TT {
|
template <class A, class TT> class TexCoord: public TT {
|
||||||
public:
|
public:
|
||||||
typedef A TextureType;
|
typedef A TexCoordType;
|
||||||
TextureType &T() { return _t; }
|
TexCoordType &T() { return _t; }
|
||||||
static bool HasTexture() { return true; }
|
static bool HasTexCoord() { return true; }
|
||||||
static void Name(std::vector<std::string> & name){name.push_back(std::string("Texture"));TT::Name(name);}
|
static void Name(std::vector<std::string> & name){name.push_back(std::string("TexCoord"));TT::Name(name);}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
TextureType _t;
|
TexCoordType _t;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class TT> class Texture2s: public Texture<TCoord2<short,1>, TT> {
|
template <class TT> class TexCoord2s: public TexCoord<TexCoord2<short,1>, TT> {
|
||||||
static void Name(std::vector<std::string> & name){name.push_back(std::string("Texture2s"));TT::Name(name);}
|
static void Name(std::vector<std::string> & name){name.push_back(std::string("TexCoord2s"));TT::Name(name);}
|
||||||
|
|
||||||
};
|
};
|
||||||
template <class TT> class Texture2f: public Texture<TCoord2<float,1>, TT> {
|
template <class TT> class TexCoord2f: public TexCoord<TexCoord2<float,1>, TT> {
|
||||||
static void Name(std::vector<std::string> & name){name.push_back(std::string("Texture2f"));TT::Name(name);}
|
static void Name(std::vector<std::string> & name){name.push_back(std::string("TexCoord2f"));TT::Name(name);}
|
||||||
};
|
};
|
||||||
template <class TT> class Texture2d: public Texture<TCoord2<double,1>, TT> {
|
template <class TT> class TexCoord2d: public TexCoord<TexCoord2<double,1>, TT> {
|
||||||
static void Name(std::vector<std::string> & name){name.push_back(std::string("Texture2d"));TT::Name(name);}
|
static void Name(std::vector<std::string> & name){name.push_back(std::string("TexCoord2d"));TT::Name(name);}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*------------------------- FLAGS -----------------------------------------*/
|
/*------------------------- FLAGS -----------------------------------------*/
|
||||||
|
|
|
@ -24,6 +24,9 @@
|
||||||
History
|
History
|
||||||
|
|
||||||
$Log: not supported by cvs2svn $
|
$Log: not supported by cvs2svn $
|
||||||
|
Revision 1.1 2005/10/15 16:24:10 ganovelli
|
||||||
|
Working release (compilata solo su MSVC), component_occ è migrato da component_opt
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
@ -69,21 +72,21 @@ template <class T> class Normal3sOcc: public NormalOcc<vcg::Point3s, T> {};
|
||||||
template <class T> class Normal3fOcc: public NormalOcc<vcg::Point3f, T> {};
|
template <class T> class Normal3fOcc: public NormalOcc<vcg::Point3f, T> {};
|
||||||
template <class T> class Normal3dOcc: public NormalOcc<vcg::Point3d, T> {};
|
template <class T> class Normal3dOcc: public NormalOcc<vcg::Point3d, T> {};
|
||||||
|
|
||||||
/*-------------------------- TEXTURE ----------------------------------------*/
|
/*-------------------------- TEXCOORD ----------------------------------------*/
|
||||||
|
|
||||||
template <class A, class T> class TextureOcc: public T {
|
template <class A, class T> class TexCoordOcc: public T {
|
||||||
public:
|
public:
|
||||||
typedef A TextureType;
|
typedef A TexCoordType;
|
||||||
TextureType &T() {return CAT< vector_occ<VertType>,TextureType>::Instance()->Get((VertType*)this); }
|
TexCoordType &T() {return CAT< vector_occ<VertType>,TexCoordType>::Instance()->Get((VertType*)this); }
|
||||||
static bool HasTexture() { return true; }
|
static bool HasTexCoord() { return true; }
|
||||||
|
|
||||||
/* private:
|
/* private:
|
||||||
TextureType _t; */
|
TexCoordType _t; */
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class T> class Texture2sOcc: public TextureOcc<TCoord2<short,1>, T> {};
|
template <class T> class TexCoord2sOcc: public TexCoordOcc<TexCoord2<short,1>, T> {};
|
||||||
template <class T> class Texture2fOcc: public TextureOcc<TCoord2<float,1>, T> {};
|
template <class T> class TexCoord2fOcc: public TexCoordOcc<TexCoord2<float,1>, T> {};
|
||||||
template <class T> class Texture2dOcc: public TextureOcc<TCoord2<double,1>, T> {};
|
template <class T> class TexCoord2dOcc: public TexCoordOcc<TexCoord2<double,1>, T> {};
|
||||||
|
|
||||||
///*------------------------- FLAGS -----------------------------------------*/
|
///*------------------------- FLAGS -----------------------------------------*/
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue