diff --git a/vcg/complex/algorithms/geodesic.h b/vcg/complex/algorithms/geodesic.h index 217e25ba..eaa73ae8 100644 --- a/vcg/complex/algorithms/geodesic.h +++ b/vcg/complex/algorithms/geodesic.h @@ -387,7 +387,8 @@ It is just a simple wrapper of the basic Compute() static void PerFaceDijsktraCompute(MeshType &m, const std::vector &seedVec, ScalarType maxDistanceThr = std::numeric_limits::max(), - std::vector *InInterval=NULL + std::vector *InInterval=NULL, + FacePointer FaceTarget=NULL ) { tri::RequireFFAdjacency(m); @@ -421,6 +422,7 @@ It is just a simple wrapper of the basic Compute() { pop_heap(Heap.begin(),Heap.end()); FacePointer curr = (Heap.back()).f; + if ((FaceTarget!=NULL)&&(curr==FaceTarget))return; Heap.pop_back(); for(int i=0;i<3;++i) @@ -451,7 +453,7 @@ It is just a simple wrapper of the basic Compute() static void PerVertexDijsktraCompute(MeshType &m, const std::vector &seedVec, ScalarType maxDistanceThr = std::numeric_limits::max(), - std::vector *InInterval=NULL + std::vector *InInterval=NULL,bool avoid_selected=false ) { tri::RequireVFAdjacency(m); @@ -493,6 +495,7 @@ It is just a simple wrapper of the basic Compute() for(size_t i=0;iIsS()))continue; ScalarType nextDist = curr->Q() + DistanceFunctor()(curr,nextV); if( (nextDist < maxDistanceThr) && (!tri::IsMarked(m,nextV) || nextDist < nextV->Q()) )