minor changes
This commit is contained in:
parent
0f747b1967
commit
417bf69fc3
|
@ -24,6 +24,9 @@
|
|||
History
|
||||
|
||||
$Log: not supported by cvs2svn $
|
||||
Revision 1.7 2005/09/14 12:56:47 pietroni
|
||||
used closest function from grid
|
||||
|
||||
Revision 1.6 2005/08/26 09:12:48 cignoni
|
||||
changed typedef A2UGridLink da 'GridStaticPtr<MESH::FaceContainer,double>::Link' a typedef 'GRID::Link'
|
||||
|
||||
|
@ -201,11 +204,11 @@ void Closest( MESH & mesh, const Point3<SCALAR> & p, GRID & gr, SCALAR & mdist,
|
|||
// break;
|
||||
// vdist += vstep;
|
||||
//}
|
||||
|
||||
scalar error = gr.bbox.Diag();
|
||||
|
||||
scalar error = mdist;
|
||||
typedef Tmark<MESH,MESH::FaceType> Marker;
|
||||
Marker t=Marker(mesh);
|
||||
MESH::FaceType* bestf= gr.GetClosest<Marker>(p,mdist,bestq,t);
|
||||
MESH::FaceType* bestf= gr.GetClosest<Marker>(p,error,bestq,t);
|
||||
|
||||
if(mdist > scalar(fabs(error)))
|
||||
{
|
||||
|
|
|
@ -24,6 +24,9 @@
|
|||
History
|
||||
|
||||
$Log: not supported by cvs2svn $
|
||||
Revision 1.21 2005/09/14 13:27:38 spinelli
|
||||
minor changes
|
||||
|
||||
Revision 1.20 2005/09/14 12:57:52 pietroni
|
||||
canged template parameters for Closest Function (use of TempMark class)
|
||||
|
||||
|
@ -342,6 +345,9 @@ namespace vcg {
|
|||
int iy = int( dy );
|
||||
int iz = int( dz );
|
||||
|
||||
if (!bbox.IsIn(p))
|
||||
assert (0);///the grid has to be extended until the point
|
||||
|
||||
double voxel_min=voxel[0];
|
||||
if (voxel_min<voxel[1]) voxel_min=voxel[1];
|
||||
if (voxel_min<voxel[2]) voxel_min=voxel[2];
|
||||
|
|
Loading…
Reference in New Issue