From f68d67fadf1c4d3d6ba607598935d2282ffdb709 Mon Sep 17 00:00:00 2001 From: nicopietroni Date: Tue, 16 Oct 2012 10:12:49 +0000 Subject: [PATCH] removed some call to importing functions --- wrap/miq/MIQ.h | 72 +------------------------------------------------- 1 file changed, 1 insertion(+), 71 deletions(-) diff --git a/wrap/miq/MIQ.h b/wrap/miq/MIQ.h index c9638806..430f4363 100644 --- a/wrap/miq/MIQ.h +++ b/wrap/miq/MIQ.h @@ -42,70 +42,6 @@ public: // Init MIQ(MeshType &_mesh):mesh(_mesh),PSolver(mesh){}; - // Load a mesh from file - bool LoadMesh(const std::string PathMesh) - { - int position=PathMesh.find(".ply"); - int err; - if (position==-1) - { - position=PathMesh.find(".obj"); - //vcg::tri::io::ImporterOBJ::Info objInf; - int mask; - vcg::tri::io::ImporterOBJ::LoadMask(PathMesh.c_str(),mask); - err=vcg::tri::io::ImporterOBJ::Open(mesh,PathMesh.c_str(),mask); - assert(position!=-1); - if (err!=0)return false; - } - else - { - err=vcg::tri::io::ImporterPLY::Open(mesh,PathMesh.c_str()); - if (err!=ply::E_NOERROR)return false; - } - ///UPDATE MESH STUFF - vcg::tri::UpdateBounding::Box(mesh); - vcg::tri::UpdateNormal::PerVertexNormalizedPerFace(mesh); - vcg::tri::UpdateNormal::PerFaceNormalized(mesh); - vcg::tri::UpdateTopology::FaceFace(mesh); - vcg::tri::UpdateTopology::VertexFace(mesh); - vcg::tri::UpdateFlags::FaceBorderFromFF(mesh); - vcg::tri::UpdateFlags::VertexBorderFromFace(mesh); - return true; - } - - // Load a field from file - bool LoadField(const std::string PathFField,const std::string PathMesh=NULL) - { - SInit.Init(&mesh); - - ///FIELD LOADING - int position=PathFField.find(".ffield"); - if (position==-1) - { - position=PathFField.find(".grad"); - assert(position!=-1); - SInit.InitFromGradOBJ(PathFField,PathMesh); - } - else - SInit.InitFromFField(PathFField); - - VInd.Init(&mesh); - //mesh.ScaleToUnitBox(); - VInd.InitMapping(); - VInd.InitFaceIntegerVal(); - VInd.InitSeamInfo(); - return true; - } - - // Load a mesh and a field from file - bool LoadMeshField(const std::string PathMesh, const std::string PathFField) - { - bool loaded=LoadMesh(PathMesh); - if (!loaded)return false; - LoadField(PathFField,PathMesh); - - return true; - } // Parametrize the mesh void Solve(StiffMode stiffMode, double Stiffness = 5.0, @@ -151,12 +87,6 @@ public: Quad.Quadrangulate(mesh,poly,factor); } -// void removeDuplicateVertices(std::vector >& V, std::vector< std::vector >& F); - -// void exportQuadMesh(std::string out); - - //bool LoadData(std::string PathMesh, - // std::string PathFField); // Bounding box of the param domain vcg::Box2 UVBox; @@ -330,7 +260,7 @@ private: if (C<4)radius=4; AddStiffening(C,radius); } - +public: // Mesh class MeshType &mesh;