From d93bfe908feb8db01a7d752525b5b03ebcb4d6a2 Mon Sep 17 00:00:00 2001 From: nicopietroni Date: Fri, 7 Nov 2014 11:41:41 +0000 Subject: [PATCH] changed reference to vertex function in order to compile with polygonal faces --- vcg/complex/algorithms/harmonic.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vcg/complex/algorithms/harmonic.h b/vcg/complex/algorithms/harmonic.h index e5acaa0b..e7f9b040 100644 --- a/vcg/complex/algorithms/harmonic.h +++ b/vcg/complex/algorithms/harmonic.h @@ -226,19 +226,19 @@ public: ScalarT cotB = 0; // Get the edge (a pair of vertices) - VertexType * v0 = f.cV0(edge); - VertexType * v1 = f.cV1(edge); + VertexType * v0 = f.cV(edge); + VertexType * v1 = f.cV((edge+1)%f.VN()); if (fp != NULL && fp != &f) { // not a border edge - VertexType * vb = fp->cV2(f.cFFi(edge)); + VertexType * vb = fp->cV((f.cFFi(edge)+2)%fp->VN()); ScalarT angleB = ComputeAngle(v0, vb, v1); cotB = vcg::math::Cos(angleB) / vcg::math::Sin(angleB); } - VertexType * va = f.cV2(edge); + VertexType * va = f.cV((edge+2)%f.VN()); ScalarT angleA = ComputeAngle(v0, va, v1); cotA = vcg::math::Cos(angleA) / vcg::math::Sin(angleA);