added CopyWedgeVertUV
This commit is contained in:
parent
3323ae51af
commit
cb9e276b1b
|
@ -26,10 +26,10 @@
|
||||||
|
|
||||||
|
|
||||||
namespace vcg {
|
namespace vcg {
|
||||||
namespace tri{
|
namespace tri{
|
||||||
template <class MeshType>
|
template <class MeshType>
|
||||||
class UV_Utils
|
class UV_Utils
|
||||||
{
|
{
|
||||||
typedef typename MeshType::CoordType CoordType;
|
typedef typename MeshType::CoordType CoordType;
|
||||||
typedef typename MeshType::ScalarType ScalarType;
|
typedef typename MeshType::ScalarType ScalarType;
|
||||||
typedef typename MeshType::FaceType FaceType;
|
typedef typename MeshType::FaceType FaceType;
|
||||||
|
@ -38,7 +38,7 @@ namespace vcg {
|
||||||
typedef typename MeshType::FaceIterator FaceIterator;
|
typedef typename MeshType::FaceIterator FaceIterator;
|
||||||
typedef typename vcg::Point2<ScalarType> UVCoordType;
|
typedef typename vcg::Point2<ScalarType> UVCoordType;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
///calculate the BBox in UV space
|
///calculate the BBox in UV space
|
||||||
static vcg::Box2<ScalarType> PerWedgeUVBox(MeshType &m)
|
static vcg::Box2<ScalarType> PerWedgeUVBox(MeshType &m)
|
||||||
{
|
{
|
||||||
|
@ -154,7 +154,16 @@ namespace vcg {
|
||||||
m.face[i].WT(j).P()=m.face[i].V(j)->T().P();
|
m.face[i].WT(j).P()=m.face[i].V(j)->T().P();
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
static void CopyWedgeVertUV(MeshType &m,bool onlyS=false)
|
||||||
} //End Namespace Tri
|
{
|
||||||
|
for (size_t i=0;i<m.face.size();i++)
|
||||||
|
{
|
||||||
|
if ((onlyS)&&(!m.face[i].IsS()))continue;
|
||||||
|
for (int j=0;j<3;j++)
|
||||||
|
m.face[i].V(j)->T().P()=m.face[i].WT(j).P();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
} //End Namespace Tri
|
||||||
} // End Namespace vcg
|
} // End Namespace vcg
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue