added GetClosestVertexScale

This commit is contained in:
ganovelli 2011-12-21 16:13:07 +00:00
parent c2e3d66d19
commit c097e6edd5
1 changed files with 17 additions and 0 deletions

View File

@ -180,6 +180,23 @@ namespace vcg {
return (gr.template GetClosest<VDistFunct,MarkerVert>(fn,mv,_p,_maxDist,_minDist,_closestPt));
}
template <class MESH, class GRID>
typename MESH::VertexType * GetClosestVertexScale( MESH & mesh,GRID & gr,const typename GRID::CoordType & _p,
const typename MESH::CoordType & center, const typename GRID::ScalarType & _maxDist,typename GRID::ScalarType & _minDist )
{
typedef typename GRID::ScalarType ScalarType;
typedef Point3<ScalarType> Point3x;
typedef VertTmark<MESH> MarkerVert;
MarkerVert mv;
mv.SetMesh(&mesh);
typedef vcg::vertex::PointScaledDistanceFunctor<typename MESH::VertexType> VDistFunct;
VDistFunct fn;
fn.Cen() = center;
_minDist=_maxDist;
Point3x _closestPt;
return (gr.template GetClosest<VDistFunct,MarkerVert>(fn,mv,_p,_maxDist,_minDist,_closestPt));
}
template <class MESH, class GRID>
typename MESH::VertexType * GetClosestVertexNormal( MESH & mesh,GRID & gr,const typename MESH::VertexType & _p,
const typename GRID::ScalarType & _maxDist,typename GRID::ScalarType & _minDist )