diff --git a/vcg/space/polygon3.h b/vcg/space/polygon3.h index 031523df..069830c4 100644 --- a/vcg/space/polygon3.h +++ b/vcg/space/polygon3.h @@ -538,12 +538,12 @@ typename PolygonType::ScalarType PolyAspectRatio(const PolygonType &F, template typename PolygonType::ScalarType PolygonPointDistance(const PolygonType &F, const vcg::Point3 &pos, - vcg::Point3 &ClosestP) + vcg::Point3 &ClosestP, + typename PolygonType::ScalarType minD = std::numeric_limits::max()) { typedef typename PolygonType::ScalarType ScalarType; typedef typename PolygonType::CoordType CoordType; - ScalarType minD=std::numeric_limits::max(); CoordType bary=vcg::PolyBarycenter(F); for (size_t j=0;j