From 968b9c548051236c1fb89947712f93d70a7a56a4 Mon Sep 17 00:00:00 2001 From: Kenneth Vanhoey Date: Wed, 2 Jul 2014 17:09:44 +0200 Subject: [PATCH] moving some lightfield import functions out of CGoGN --- include/Algo/Import/import2tablesSurface.hpp | 14 +------------- include/Algo/Import/importFileTypes.h | 9 --------- 2 files changed, 1 insertion(+), 22 deletions(-) diff --git a/include/Algo/Import/import2tablesSurface.hpp b/include/Algo/Import/import2tablesSurface.hpp index 7f02db28..07966559 100644 --- a/include/Algo/Import/import2tablesSurface.hpp +++ b/include/Algo/Import/import2tablesSurface.hpp @@ -71,18 +71,6 @@ bool MeshTablesSurface::importMesh(const std::string& filename, std::vector CGoGNout << "TYPE: PLY" << CGoGNendl; return importPly(filename, attrNames); break; -/* case PLYPTM: - CGoGNout << "TYPE: PLYPTM" << CGoGNendl; - return importPlyPTM(filename, attrNames); - break; -*/ case PLYSLFgeneric: - CGoGNout << "TYPE: PLYSLFgeneric" << CGoGNendl; - return importPlySLFgeneric(filename, attrNames); - break; - case PLYSLFgenericBin: - CGoGNout << "TYPE: PLYSLFgenericBin" << CGoGNendl; - return importPlySLFgenericBin(filename, attrNames); - break; case OBJ: CGoGNout << "TYPE: OBJ" << CGoGNendl; return importObj(filename, attrNames); @@ -770,7 +758,7 @@ bool MeshTablesSurface::importPlySLFgeneric(const std::string& filename, st // Define containers VertexAttribute positions = m_map.template getAttribute("position") ; -; + if (!positions.isValid()) positions = m_map.template addAttribute("position") ; attrNames.push_back(positions.name()) ; diff --git a/include/Algo/Import/importFileTypes.h b/include/Algo/Import/importFileTypes.h index 1b058771..6efb6a92 100644 --- a/include/Algo/Import/importFileTypes.h +++ b/include/Algo/Import/importFileTypes.h @@ -48,15 +48,6 @@ namespace Import if ((filename.rfind(".meshbin")!=std::string::npos) || (filename.rfind(".MESHBIN")!=std::string::npos)) return MESHBIN; - /* if ((filename.rfind(".plyptm")!=std::string::npos) || (filename.rfind(".PLYGEN")!=std::string::npos)) - return PLYPTM; - */ - if ((filename.rfind(".plyPTMextBin")!=std::string::npos) || (filename.rfind(".plySHrealBin")!=std::string::npos)) - return PLYSLFgenericBin; - - if ((filename.rfind(".plyPTMext")!=std::string::npos) || (filename.rfind(".plySHreal")!=std::string::npos)) - return PLYSLFgeneric; - if ((filename.rfind(".ply")!=std::string::npos) || (filename.rfind(".PLY")!=std::string::npos)) return PLY; -- GitLab