changed the interface of the texel sampling function. Now width and height of the sampling texture can be different

This commit is contained in:
Paolo Cignoni 2008-11-14 15:12:02 +00:00
parent b5d3a085a8
commit 5c6c7cafd5
1 changed files with 2 additions and 2 deletions

View File

@ -595,7 +595,7 @@ static void SingleFaceRaster(FaceType &f, VertexSampler &ps, const Point2<Scala
//template <class MetroMesh>
//void Sampling<MetroMesh>::SimilarFaceSampling()
static void Texture(MetroMesh & m, VertexSampler &ps, int textureSize)
static void Texture(MetroMesh & m, VertexSampler &ps, int textureWidth, int textureHeight)
{
FaceIterator fi;
@ -604,7 +604,7 @@ static void Texture(MetroMesh & m, VertexSampler &ps, int textureSize)
{
Point2f ti[3];
for(int i=0;i<3;++i)
ti[i]=Point2f((*fi).WT(i).U() * textureSize, (*fi).WT(i).V() * textureSize);
ti[i]=Point2f((*fi).WT(i).U() * textureWidth, (*fi).WT(i).V() * textureHeight);
SingleFaceRaster(*fi, ps, ti[0],ti[1],ti[2]);
}