added CopyWedgeVertUV
This commit is contained in:
parent
3323ae51af
commit
cb9e276b1b
|
|
@ -26,10 +26,10 @@
|
|||
|
||||
|
||||
namespace vcg {
|
||||
namespace tri{
|
||||
template <class MeshType>
|
||||
class UV_Utils
|
||||
{
|
||||
namespace tri{
|
||||
template <class MeshType>
|
||||
class UV_Utils
|
||||
{
|
||||
typedef typename MeshType::CoordType CoordType;
|
||||
typedef typename MeshType::ScalarType ScalarType;
|
||||
typedef typename MeshType::FaceType FaceType;
|
||||
|
|
@ -38,7 +38,7 @@ namespace vcg {
|
|||
typedef typename MeshType::FaceIterator FaceIterator;
|
||||
typedef typename vcg::Point2<ScalarType> UVCoordType;
|
||||
|
||||
public:
|
||||
public:
|
||||
///calculate the BBox in UV space
|
||||
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();
|
||||
}
|
||||
|
||||
};
|
||||
} //End Namespace Tri
|
||||
static void CopyWedgeVertUV(MeshType &m,bool onlyS=false)
|
||||
{
|
||||
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
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in New Issue