Small refactoring (using pos)

This commit is contained in:
Paolo Cignoni 2014-05-15 05:36:53 +00:00
parent 51599b37ca
commit 4fc8ed68ba
1 changed files with 5 additions and 8 deletions

View File

@ -3,7 +3,6 @@
#include <vcg/complex/complex.h>
#include <vcg/simplex/face/pos.h>
#include <vcg/simplex/face/jumping_pos.h>
#include <vcg/simplex/face/topology.h>
#include <wrap/io_trimesh/import_field.h>
template <class MeshType>
@ -40,19 +39,17 @@ private:
bool IsSingularByMMatch(const VertexType &v,int &missmatch)
{
///check that is on border..
if (v.IsB())return false;
std::vector<FaceType*> faces;
std::vector<int> edges;
if (v.IsB()) return false;
vcg::face::Pos<FaceType> pos(v.cVFp(), v.cVFi());
vcg::face::VFOrderedStarFF(pos,faces,edges);
std::vector<vcg::face::Pos<FaceType> > posVec;
vcg::face::VFOrderedStarFF(pos, posVec);
missmatch=0;
for (unsigned int i=0;i<faces.size();i++)
{
FaceType *curr_f=faces[i];
int currMM=Handle_MMatch[curr_f][edges[i]];
FaceType *curr_f=posVec[i].F();
int currMM=Handle_MMatch[curr_f][posVec[i].E()];
missmatch+=currMM;
}
missmatch=missmatch%4;