corrected 1 bug in PointDistance function
This commit is contained in:
parent
02ccdd90ec
commit
98e834c540
|
@ -48,8 +48,8 @@ namespace vcg {
|
||||||
s.P0()=e.V(0)->P();
|
s.P0()=e.V(0)->P();
|
||||||
s.P1()=e.V(1)->P();
|
s.P1()=e.V(1)->P();
|
||||||
typename EdgeType::CoordType near;
|
typename EdgeType::CoordType near;
|
||||||
vcg::ClosestPoint<typename EdgeType::ScalarType>(s,near);
|
near=vcg::ClosestPoint<typename EdgeType::ScalarType>(s,q);
|
||||||
typename EdgeType::ScalarType d=(q-p).Norm();
|
typename EdgeType::ScalarType d=(q-near).Norm();
|
||||||
if (d<dist){
|
if (d<dist){
|
||||||
dist=d;
|
dist=d;
|
||||||
p=near;
|
p=near;
|
||||||
|
|
Loading…
Reference in New Issue