added GetClosestEdgeBase from space/index/index2/closest_2d.h which is going to be removed

This commit is contained in:
ganovelli 2014-10-09 12:53:40 +00:00
parent 5249736918
commit 46031c54ca
1 changed files with 17 additions and 0 deletions

View File

@ -494,6 +494,23 @@ namespace vcg {
};
/// this is for meshes with 2D coordinates
template <class MESH, class GRID>
typename MESH::FaceType * GetClosestEdgeBase( MESH & mesh,GRID & gr,const typename GRID::CoordType & _p,
const typename GRID::ScalarType _maxDist,typename GRID::ScalarType & _minDist,
typename GRID::CoordType &_closestPt)
{
typedef typename GRID::ScalarType ScalarType;
typedef Point3<ScalarType> Point3x;
typedef FaceTmark<MESH> MarkerFace;
MarkerFace mf;
mf.SetMesh(&mesh);
vcg::PointSegment2DEPFunctor<ScalarType> PDistFunct;
_minDist=_maxDist;
return (gr.GetClosest(PDistFunct,mf,_p,_maxDist,_minDist,_closestPt));
}
} // end namespace tri
} // end namespace vcg