Small refactoring (using pos)
This commit is contained in:
parent
51599b37ca
commit
4fc8ed68ba
|
@ -3,7 +3,6 @@
|
||||||
#include <vcg/complex/complex.h>
|
#include <vcg/complex/complex.h>
|
||||||
#include <vcg/simplex/face/pos.h>
|
#include <vcg/simplex/face/pos.h>
|
||||||
#include <vcg/simplex/face/jumping_pos.h>
|
#include <vcg/simplex/face/jumping_pos.h>
|
||||||
#include <vcg/simplex/face/topology.h>
|
|
||||||
#include <wrap/io_trimesh/import_field.h>
|
#include <wrap/io_trimesh/import_field.h>
|
||||||
|
|
||||||
template <class MeshType>
|
template <class MeshType>
|
||||||
|
@ -40,19 +39,17 @@ private:
|
||||||
bool IsSingularByMMatch(const VertexType &v,int &missmatch)
|
bool IsSingularByMMatch(const VertexType &v,int &missmatch)
|
||||||
{
|
{
|
||||||
///check that is on border..
|
///check that is on border..
|
||||||
if (v.IsB())return false;
|
if (v.IsB()) return false;
|
||||||
|
|
||||||
std::vector<FaceType*> faces;
|
|
||||||
std::vector<int> edges;
|
|
||||||
|
|
||||||
vcg::face::Pos<FaceType> pos(v.cVFp(), v.cVFi());
|
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;
|
missmatch=0;
|
||||||
for (unsigned int i=0;i<faces.size();i++)
|
for (unsigned int i=0;i<faces.size();i++)
|
||||||
{
|
{
|
||||||
FaceType *curr_f=faces[i];
|
FaceType *curr_f=posVec[i].F();
|
||||||
int currMM=Handle_MMatch[curr_f][edges[i]];
|
int currMM=Handle_MMatch[curr_f][posVec[i].E()];
|
||||||
missmatch+=currMM;
|
missmatch+=currMM;
|
||||||
}
|
}
|
||||||
missmatch=missmatch%4;
|
missmatch=missmatch%4;
|
||||||
|
|
Loading…
Reference in New Issue