diff --git a/vcg/complex/algorithms/geodesic.h b/vcg/complex/algorithms/geodesic.h index e5a438fe..db45cd2d 100644 --- a/vcg/complex/algorithms/geodesic.h +++ b/vcg/complex/algorithms/geodesic.h @@ -176,13 +176,14 @@ public: struct DIJKDist{ - DIJKDist(VertexPointer _v):v(_v){} + DIJKDist(VertexPointer _v):v(_v), q(_v->Q()){} VertexPointer v; + ScalarType q; bool operator < (const DIJKDist &o) const { - if( v->Q() != o.v->Q()) - return v->Q() > o.v->Q(); + if( q != o.q) + return q > o.q; return v Heap; tri::UnMarkAll(m); + tri::UnMarkAll(m); for(size_t i=0;i