diff --git a/vcg/complex/algorithms/geodesic.h b/vcg/complex/algorithms/geodesic.h index 0d04d596..e2e486bf 100644 --- a/vcg/complex/algorithms/geodesic.h +++ b/vcg/complex/algorithms/geodesic.h @@ -92,8 +92,8 @@ struct BasicCrossFunctor BasicCrossFunctor(MeshType &m) { tri::RequirePerVertexCurvatureDir(m); } typedef typename MeshType::VertexType VertexType; - Point3f D1(VertexType &v) { return v.PD1(); } - Point3f D2(VertexType &v) { return v.PD1(); } + typename MeshType::CoordType D1(VertexType &v) { return v.PD1(); } + typename MeshType::CoordType D2(VertexType &v) { return v.PD2(); } }; /** @@ -111,12 +111,12 @@ class AnisotropicDistance{ typedef typename MeshType::CoordType CoordType; typedef typename MeshType::VertexIterator VertexIterator; - typename MeshType::template PerVertexAttributeHandle wxH,wyH; + typename MeshType::template PerVertexAttributeHandle wxH,wyH; public: template AnisotropicDistance(MeshType &m, CrossFunctor &cf) { - wxH = tri::Allocator:: template GetPerVertexAttribute (m,"distDirX"); - wyH = tri::Allocator:: template GetPerVertexAttribute (m,"distDirY"); + wxH = tri::Allocator:: template GetPerVertexAttribute (m,"distDirX"); + wyH = tri::Allocator:: template GetPerVertexAttribute (m,"distDirY"); for(VertexIterator vi=m.vert.begin();vi!=m.vert.end();++vi) { @@ -127,7 +127,7 @@ public: ScalarType operator()( VertexType * v0, VertexType * v1) { - Point3f dd = Point3f::Construct(v0->cP()-v1->cP()); + CoordType dd = v0->cP()-v1->cP(); float x = (fabs(dd * wxH[v0])+fabs(dd *wxH[v1]))/2.0f; float y = (fabs(dd * wyH[v0])+fabs(dd *wyH[v1]))/2.0f;