Cleaned up include files and templates in MIQ

This commit is contained in:
Paolo Cignoni 2012-10-18 16:25:50 +00:00
parent bba85aeddb
commit 7e26fd3c27
5 changed files with 12 additions and 16 deletions

View File

@ -2,7 +2,6 @@
#define __MIQ__
#include <iostream>
#include <vector>
#include "quadrangulator.h"
#include "core/poisson_solver.h"
#include "core/param_stats.h"
@ -10,8 +9,6 @@
#include "core/vertex_indexing.h"
#include "core/stiffening.h"
#include <vcg/complex/algorithms/clean.h>
#include <wrap/io_trimesh/import.h>
#include <wrap/io_trimesh/export.h>
#define USECOMISO

View File

@ -8,7 +8,6 @@
#include "auxmath.h"
#include "sparsesystemdata.h"
#include "mesh_type.h"
#include "vertex_indexing.h"
template <class MeshType>

View File

@ -35,19 +35,19 @@ private:
}
///return true if a vertex is singluar by looking at initialized missmatches
bool IsSingularByMMatch(const CVertex &v,int &missmatch)
bool IsSingularByMMatch(const VertexType &v,int &missmatch)
{
///check that is on border..
if (v.IsB())return false;
std::vector<CFace*> faces;
std::vector<FaceType*> faces;
std::vector<int> edges;
vcg::face::VFOrderedStarVF_FF<CFace>(v,faces,edges);
vcg::face::VFOrderedStarVF_FF<FaceType>(v,faces,edges);
missmatch=0;
for (unsigned int i=0;i<faces.size();i++)
{
CFace *curr_f=faces[i];
FaceType *curr_f=faces[i];
int currMM=Handle_MMatch[curr_f][edges[i]];
missmatch+=currMM;
}
@ -191,7 +191,7 @@ private:
int InitTopologycalCuts(){
vcg::tri::UpdateFlags<CMesh>::FaceClearV(*mesh);
vcg::tri::UpdateFlags<MeshType>::FaceClearV(*mesh);
for (FaceIterator f = mesh->face.begin(); f!=mesh->face.end(); f++)
if (!f->IsD())
@ -220,14 +220,14 @@ private:
{
for (unsigned int i=0;i<mesh->face.size();i++)
{
CFace *curr_f=&mesh->face[i];
FaceType *curr_f=&mesh->face[i];
for (int j=0;j<3;j++)
{
CFace *opp_f=curr_f->FFp(j);
FaceType *opp_f=curr_f->FFp(j);
if (curr_f==opp_f)
Handle_MMatch[curr_f][j]=0;
else
Handle_MMatch[curr_f][j]=vcg::tri::CrossField<CMesh>::MissMatchByCross(*curr_f,*opp_f);
Handle_MMatch[curr_f][j]=vcg::tri::CrossField<MeshType>::MissMatchByCross(*curr_f,*opp_f);
}
}
}

View File

@ -31,7 +31,7 @@ public:
for (unsigned int i=0;i<mesh.face.size();i++)
{
//CMesh::ScalarType val=MaxVal-mesh.face[i].stiffening+1;
//MeshType::ScalarType val=MaxVal-mesh.face[i].stiffening+1;
ScalarType val=MaxVal-Handle_Stiffness[i]+1;
if (val<1)val=1;
mesh.face[i].C()=vcg::Color4b::ColorRamp(1.0,MaxVal,val);
@ -54,7 +54,7 @@ public:
assert(hasSingular);
typename MeshType::template PerVertexAttributeHandle<bool> Handle_Singular;
Handle_Singular=vcg::tri::Allocator<CMesh>::GetPerVertexAttribute<bool>(mesh,std::string("Singular"));
Handle_Singular=vcg::tri::Allocator<MeshType>:: template GetPerVertexAttribute<bool>(mesh,std::string("Singular"));
std::vector<VertexType*> to_stiff;
for(unsigned int i=0;i<mesh.vert.size();i++)
@ -85,7 +85,7 @@ public:
VertexType *v=to_stiff[i];
for (int r=0;r<radius;r++)
{
CMesh::ScalarType stiffVal=((CMesh::ScalarType)r)/(CMesh::ScalarType)radius;//((ScalarType)(radius-r))/(ScalarType)radius;
ScalarType stiffVal=((ScalarType)r)/(ScalarType)radius;//((ScalarType)(radius-r))/(ScalarType)radius;
stiffVal*=3.0;
stiffVal=Gauss(stiffVal)/0.4;
stiffVal=1+(stiffVal*C);

View File

@ -139,7 +139,7 @@ private:
assert(f0->cV1(edgef0)==f1->cV0(edgef1));
}
bool IsSeam(CFace *f0,CFace *f1)
bool IsSeam(FaceType *f0,FaceType *f1)
{
for (int i=0;i<3;i++)
{