From 3bb9c7cbc64966f8aab1fc90a81be5ff2358ddbf Mon Sep 17 00:00:00 2001 From: ponchio Date: Tue, 6 Nov 2007 16:12:24 +0000 Subject: [PATCH] Addded check for no color in mesh --- vcg/complex/trimesh/clustering.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/vcg/complex/trimesh/clustering.h b/vcg/complex/trimesh/clustering.h index b5c3d688..39e480b0 100644 --- a/vcg/complex/trimesh/clustering.h +++ b/vcg/complex/trimesh/clustering.h @@ -24,6 +24,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.11 2006/06/08 13:55:16 cignoni +Added ColorPreserving Cellbase template. + Revision 1.10 2006/05/26 10:18:11 cignoni Re-adapted to ms compilers @@ -323,7 +326,8 @@ class Clustering for(gi=GridCell.begin();gi!=GridCell.end();++gi) { m.vert[i].P()=(*gi).second.Pos(); - m.vert[i].C()=(*gi).second.Col(); + if(m.vert[i].HasColor()) + m.vert[i].C()=(*gi).second.Col(); (*gi).second.id=i; ++i; }