corrected 1 bug in PointDistance function

This commit is contained in:
Nico Pietroni 2009-09-18 09:16:17 +00:00
parent 02ccdd90ec
commit 98e834c540
1 changed files with 2 additions and 2 deletions

View File

@ -48,8 +48,8 @@ namespace vcg {
s.P0()=e.V(0)->P();
s.P1()=e.V(1)->P();
typename EdgeType::CoordType near;
vcg::ClosestPoint<typename EdgeType::ScalarType>(s,near);
typename EdgeType::ScalarType d=(q-p).Norm();
near=vcg::ClosestPoint<typename EdgeType::ScalarType>(s,q);
typename EdgeType::ScalarType d=(q-near).Norm();
if (d<dist){
dist=d;
p=near;