From d2bcd3dffa0f0b5c30212745d4957ae9ce84c047 Mon Sep 17 00:00:00 2001 From: nicopietroni Date: Fri, 27 Feb 2009 16:12:20 +0000 Subject: [PATCH] added in MidPoint inheritance of texture coordinates --- vcg/complex/trimesh/refine.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vcg/complex/trimesh/refine.h b/vcg/complex/trimesh/refine.h index bd1d612d..57324bdf 100644 --- a/vcg/complex/trimesh/refine.h +++ b/vcg/complex/trimesh/refine.h @@ -128,6 +128,9 @@ struct MidPoint : public std::unary_functionV(ep.z)->Q()+ep.f->V1(ep.z)->Q())) / 2.0; + + if( MESH_TYPE::HasPerVertexTexCoord()) + nv.T().P() = ((ep.f->V(ep.z)->T().P()+ep.f->V1(ep.z)->T().P())) / 2.0; } Color4 WedgeInterp(Color4 &c0, Color4 &c1)