Commit a4b94aa3 authored by CGoGN GIT Supervisor's avatar CGoGN GIT Supervisor

Merge branch 'master' of /home/vanhoey/CGoGN

* 'master' of /home/vanhoey/CGoGN:
  update on import/export of ply data
parents 17547a5f e8aa0a38
......@@ -119,9 +119,9 @@ bool exportTrian(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC
* @param nbCoefs the number of coefficients of the representation
* @return true
*/
template <typename PFP>
/*template <typename PFP>
bool exportPlyPTMgeneric(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3>& position, const char* filename, const FunctorSelect& good = allDarts) ;
*/
/**
* export the map into a PLYPTMgeneric file (K. Vanhoey generic format)
* @param map map to be exported
......@@ -131,9 +131,10 @@ bool exportPlyPTMgeneric(typename PFP::MAP& map, const VertexAttribute<typename
* @param colorPTM the 6 coefficients (x3 channels) of the PTM functions
* @return true
*/
/*
template <typename PFP>
bool exportPLYPTM(typename PFP::MAP& map, const char* filename, const VertexAttribute<typename PFP::VEC3>& position, const VertexAttribute<typename PFP::VEC3> frame[3], const VertexAttribute<typename PFP::VEC3> colorPTM[6], const FunctorSelect& good = allDarts) ;
*/
/**
* export meshes used at the workbench
* export just a list of vertices and edges connectivity
......
......@@ -281,9 +281,12 @@ bool exportPLYnew(typename PFP::MAP& map, const std::vector<VertexAttribute<type
{
// ascii vertices
for(unsigned int i = 0; i < vertices.size(); ++i)
{
for (typename std::vector<VertexAttribute<typename PFP::VEC3>* >::const_iterator attrHandler = attributeHandlers.begin() ; attrHandler != attributeHandlers.end() ; ++attrHandler)
if ((*attrHandler)->isValid() && (*attrHandler)->getOrbit() == VERTEX)
out << (*(*attrHandler))[vertices[i]] << std::endl ;
out << (*(*attrHandler))[vertices[i]] ;
out << std::endl ;
}
// ascii faces
for(unsigned int i = 0; i < facesSize.size(); ++i)
......@@ -309,7 +312,7 @@ bool exportPLYnew(typename PFP::MAP& map, const std::vector<VertexAttribute<type
for(unsigned int i = 0; i < facesSize.size(); ++i)
{
uint8_t nbe = facesSize[i] ;
out.write((char*)(&nbe), sizeof(unsigned char)) ;
out.write((char*)(&nbe), sizeof(uint8_t)) ;
out.write((char*)(&(facesIdx[i][0])), facesSize[i] * sizeof(facesIdx[i][0])) ;
}
}
......@@ -385,7 +388,7 @@ bool exportOFF(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3>
out.close() ;
return true ;
}
/*
template <typename PFP>
bool exportPlyPTMgeneric(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3>& position, const char* filename, const FunctorSelect& good)
{
......@@ -524,6 +527,7 @@ bool exportPlyPTMgeneric(typename PFP::MAP& map, const VertexAttribute<typename
out.close() ;
return true ;
}
*/
/*
template <typename PFP>
bool exportPlySLFgeneric(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3>& position, const char* filename, const FunctorSelect& good)
......@@ -795,7 +799,6 @@ bool exportPlySLFgenericBin(typename PFP::MAP& map, const VertexAttribute<typena
out.close() ;
return true ;
}
*/
template <typename PFP>
bool exportPLYPTM(typename PFP::MAP& map, const char* filename, const VertexAttribute<typename PFP::VEC3>& position, const VertexAttribute<typename PFP::VEC3> frame[3], const VertexAttribute<typename PFP::VEC3> colorPTM[6], const FunctorSelect& good)
......@@ -909,6 +912,7 @@ bool exportPLYPTM(typename PFP::MAP& map, const char* filename, const VertexAttr
out.close() ;
return true ;
}
*/
template <typename PFP>
bool exportChoupi(typename PFP::MAP& map, const AttributeHandler<typename PFP::VEC3, VERTEX>& position, const char* filename, const FunctorSelect& good)
......
......@@ -52,7 +52,7 @@ namespace Import
namespace ImportSurfacique
{
enum ImportType { UNKNOWNSURFACE, TRIAN, TRIANBGZ, MESHBIN, PLY, /*PLYPTM, PLYSLFgeneric, PLYSLFgenericBin, */OFF, OBJ, VRML, AHEM };
enum ImportType { UNKNOWNSURFACE, TRIAN, TRIANBGZ, MESHBIN, PLY, /*PLYPTM, */PLYSLFgeneric, PLYSLFgenericBin, OFF, OBJ, VRML, AHEM };
}
namespace ImportVolumique
......@@ -115,10 +115,10 @@ public:
bool importPly(const std::string& filename, std::vector<std::string>& attrNames);
/* bool importPlyPTM(const std::string& filename, std::vector<std::string>& attrNames);
// bool importPlyPTM(const std::string& filename, std::vector<std::string>& attrNames);
bool importPlySLFgeneric(const std::string& filename, std::vector<std::string>& attrNames);
bool importPlySLFgenericBin(const std::string& filename, std::vector<std::string>& attrNames);
*/
#ifdef WITH_ASSIMP
bool importASSIMP(const std::string& filename, std::vector<std::string>& attrNames);
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment