Corrected a bug in search for the best edge to be fixed in the FindFarthestVert when setting up the system for the poisson solver...

This commit is contained in:
Paolo Cignoni 2012-07-02 09:38:42 +00:00
parent 7cc19a31c6
commit 487b6c7bd5
1 changed files with 3 additions and 2 deletions

View File

@ -140,7 +140,7 @@ class PoissonSolver
assert(v1!=NULL); assert(v1!=NULL);
}*/ }*/
void FindFarestVert(VertexType* &v0,VertexType* &v1) void FindFarthestVert(VertexType* &v0,VertexType* &v1)
{ {
UpdateBounding<MeshType>::Box(mesh); UpdateBounding<MeshType>::Box(mesh);
@ -163,6 +163,7 @@ class PoissonSolver
ScalarType d_test=(vt0->P()-vt1->P()).Norm(); ScalarType d_test=(vt0->P()-vt1->P()).Norm();
if (d_test>dmax) if (d_test>dmax)
{ {
dmax=d_test;
v0=vt0; v0=vt0;
v1=vt1; v1=vt1;
} }
@ -686,7 +687,7 @@ public:
{ {
VertexType *v0; VertexType *v0;
VertexType *v1; VertexType *v1;
FindFarestVert(v0,v1); FindFarthestVert(v0,v1);
if (v0==v1) if (v0==v1)
{ {
// tri::io::ExporterPLY<MeshType>::Save(mesh,"./parametrized.ply"); // tri::io::ExporterPLY<MeshType>::Save(mesh,"./parametrized.ply");