From ec70371a7829f8abb331029da527d412a178e14b Mon Sep 17 00:00:00 2001 From: ponchio Date: Mon, 27 Feb 2006 18:02:57 +0000 Subject: [PATCH] Area -> doublearea/2 added some typename --- vcg/complex/trimesh/update/curvature.h | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/vcg/complex/trimesh/update/curvature.h b/vcg/complex/trimesh/update/curvature.h index 3307ac5f..d201fb1e 100644 --- a/vcg/complex/trimesh/update/curvature.h +++ b/vcg/complex/trimesh/update/curvature.h @@ -23,6 +23,9 @@ /**************************************************************************** History $Log: not supported by cvs2svn $ +Revision 1.2 2005/10/25 09:17:41 spinelli +correct IsBorder + Revision 1.1 2005/02/22 16:40:29 ganovelli created. This version writes the gaussian curvature on the Q() member of the vertex @@ -67,8 +70,8 @@ Discrete Differential-Geometry Operators for Triangulated 2-Manifolds Mark Meyer static void Gaussian( MeshType & m){ assert(m.HasPerVertexQuality()); - MeshType::VertexIterator vi; // iteratore vertice - MeshType::FaceIterator fi; // iteratore facce + typename MeshType::VertexIterator vi; // iteratore vertice + typename MeshType::FaceIterator fi; // iteratore facce double *area; // areamix vector int i; // index double area0, area1, area2; @@ -109,9 +112,9 @@ static void Gaussian( MeshType & m){ } else // triangolo ottuso { - (*fi).V(0)->Q() += (*fi).Area() / 3; - (*fi).V(1)->Q() += (*fi).Area() / 3; - (*fi).V(2)->Q() += (*fi).Area() / 3; + (*fi).V(0)->Q() += (*fi).DoubleArea() / 6; + (*fi).V(1)->Q() += (*fi).DoubleArea() / 6; + (*fi).V(2)->Q() += (*fi).DoubleArea() / 6; } } @@ -129,7 +132,7 @@ static void Gaussian( MeshType & m){ { if(vcg::face::IsBorder((*fi), i)) { - MeshType::CoordType e1,e2; + typename MeshType::CoordType e1,e2; vcg::face::Pos hp(&*fi,i,(*fi).V(i)); //MeshType::hedgepos_type hp(&*fi,i,(*fi).V(i)); vcg::face::Pos hp1=hp;