From 5c6c7cafd5a3832cd70a59d0dfe4ac54538c7cc3 Mon Sep 17 00:00:00 2001 From: cignoni Date: Fri, 14 Nov 2008 15:12:02 +0000 Subject: [PATCH] changed the interface of the texel sampling function. Now width and height of the sampling texture can be different --- vcg/complex/trimesh/point_sampling.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vcg/complex/trimesh/point_sampling.h b/vcg/complex/trimesh/point_sampling.h index e390ae52..2d7090fe 100644 --- a/vcg/complex/trimesh/point_sampling.h +++ b/vcg/complex/trimesh/point_sampling.h @@ -595,7 +595,7 @@ static void SingleFaceRaster(FaceType &f, VertexSampler &ps, const Point2 //void Sampling::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]); }