added if (!l->Elem()->IsD()) test on each element
This commit is contained in:
parent
5613d4c584
commit
06adb386ad
|
@ -24,6 +24,9 @@
|
|||
History
|
||||
|
||||
$Log: not supported by cvs2svn $
|
||||
Revision 1.4 2005/01/28 12:00:33 cignoni
|
||||
small gcc compiling issues for namespaces
|
||||
|
||||
Revision 1.3 2005/01/24 11:47:23 cignoni
|
||||
Now used also by the official Metro
|
||||
Removed using namespace (NEVER IN HEADERS!)
|
||||
|
@ -128,7 +131,8 @@ void Closest( MESH & mesh, const Point3<SCALAR> & p, GRID & gr, SCALAR & mdist,
|
|||
A2UGridLink *first, *last, *l;
|
||||
gr.Grid( gx, gy, gz, first, last );
|
||||
for(l=first;l!=last;++l)
|
||||
|
||||
if (!l->Elem()->IsD())
|
||||
{
|
||||
if( ! mesh.IsMarked( &*(l->Elem())) )
|
||||
{
|
||||
if( face::PointDistance((*(l->Elem())), p, error, q) )
|
||||
|
@ -140,6 +144,7 @@ void Closest( MESH & mesh, const Point3<SCALAR> & p, GRID & gr, SCALAR & mdist,
|
|||
mesh.Mark( &*(l->Elem()) );
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for(int ix=gx-s;ix<=gx+s;++ix)
|
||||
|
@ -156,6 +161,8 @@ void Closest( MESH & mesh, const Point3<SCALAR> & p, GRID & gr, SCALAR & mdist,
|
|||
A2UGridLink *first, *last, *l;
|
||||
gr.Grid( ix, iy, iz, first, last );
|
||||
for(l=first;l!=last;++l)
|
||||
if (!l->Elem()->IsD())
|
||||
{
|
||||
if( ! mesh.IsMarked( &*(l->Elem())) )
|
||||
{
|
||||
if( vcg::face::PointDistance((*(l->Elem())), p, error, q) )
|
||||
|
@ -169,6 +176,7 @@ void Closest( MESH & mesh, const Point3<SCALAR> & p, GRID & gr, SCALAR & mdist,
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if( fabs(error)<vdist )
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue