changed polygon-point distance function signature

This commit is contained in:
Luigi Malomo 2018-05-31 19:37:31 +02:00
parent dd0e338923
commit 52de296f73
1 changed files with 2 additions and 2 deletions

View File

@ -538,12 +538,12 @@ typename PolygonType::ScalarType PolyAspectRatio(const PolygonType &F,
template<class PolygonType>
typename PolygonType::ScalarType PolygonPointDistance(const PolygonType &F,
const vcg::Point3<typename PolygonType::ScalarType> &pos,
vcg::Point3<typename PolygonType::ScalarType> &ClosestP)
vcg::Point3<typename PolygonType::ScalarType> &ClosestP,
typename PolygonType::ScalarType minD = std::numeric_limits<typename PolygonType::ScalarType>::max())
{
typedef typename PolygonType::ScalarType ScalarType;
typedef typename PolygonType::CoordType CoordType;
ScalarType minD=std::numeric_limits<ScalarType>::max();
CoordType bary=vcg::PolyBarycenter(F);
for (size_t j=0;j<F.VN();j++)
{