Commit 404daac7 authored by Pierre Kraemer's avatar Pierre Kraemer
Browse files

Merge cgogn:~vanhoey/CGoGN

parents 74b5d94e 132c1266
......@@ -76,7 +76,37 @@ bool exportTrian(typename PFP::MAP& map, const typename PFP::TVEC3& position, ch
* @return true
*/
template <typename PFP>
bool exportPlyPTMgeneric(typename PFP::MAP& map, const char* filename, const typename PFP::TVEC3& position, const FunctorSelect& good = allDarts) ;
bool exportPlySLFgeneric(typename PFP::MAP& map, const typename PFP::TVEC3& position, const char* filename, const FunctorSelect& good = allDarts) ;
/**
* export the map into a PLYPTMgeneric file (K. Vanhoey generic format).
*
* exports position + any attribute named : "frame_T" (frame tangent : VEC3), "frame_B" (frame binormal : VEC3), "frame_N" (frame normal : VEC3),
* "colorPTM_a<i> : VEC3" (coefficient number i of the 3 polynomials - one per channel - ; the max i depends on the degree of the PTM polynomial),
* "errL2 : REAL" (L2 fitting error), "errLmax : REAL" (maximal fitting error), "stdDev : REAL" (standard deviation of the L2 fitting errors).
*
* @param map map to be exported
* @param filename filename of ply file
* @param position the position container
* @return true
*/
template <typename PFP>
bool exportPlySLFgenericBin(typename PFP::MAP& map, const typename PFP::TVEC3& position, const char* filename, const FunctorSelect& good = allDarts) ;
/**
* export the map into a PLYSLF file (K. Vanhoey generic format).
*
* exports position + any attribute named : "frame_T" (frame tangent : VEC3), "frame_B" (frame binormal : VEC3), "frame_N" (frame normal : VEC3),
* "SLF_<i> : VEC3" (coefficient number i of the 3 - one per channel - ; the max i is nbCoefs),
*
* @param map map to be exported
* @param filename filename of ply file
* @param position the position container
* @param nbCoefs the number of coefficients of the representation
* @return true
*/
template <typename PFP>
bool exportPlyPTMgeneric(typename PFP::MAP& map, const typename PFP::TVEC3& position, const char* filename, const FunctorSelect& good = allDarts) ;
/**
* export the map into a PLYPTMgeneric file (K. Vanhoey generic format)
......@@ -88,7 +118,7 @@ bool exportPlyPTMgeneric(typename PFP::MAP& map, const char* filename, const typ
* @return true
*/
template <typename PFP>
bool exportPLYPTM(typename PFP::MAP& map, const char* filename, const typename PFP::TVEC3& position, const typename PFP::TVEC3 frame[3], const typename PFP::TVEC3 colorPTM[6], const FunctorSelect& good) ;
bool exportPLYPTM(typename PFP::MAP& map, const char* filename, const typename PFP::TVEC3& position, const typename PFP::TVEC3 frame[3], const typename PFP::TVEC3 colorPTM[6], const FunctorSelect& good = allDarts) ;
} // namespace Export
......
......@@ -180,7 +180,7 @@ bool exportOFF(typename PFP::MAP& map, const typename PFP::TVEC3& position, cons
}
template <typename PFP>
bool exportPlyPTMgeneric(typename PFP::MAP& map, const char* filename, const typename PFP::TVEC3& position, const FunctorSelect& good)
bool exportPlyPTMgeneric(typename PFP::MAP& map, const typename PFP::TVEC3& position, const char* filename, const FunctorSelect& good)
{
typedef typename PFP::MAP MAP;
typedef typename PFP::VEC3 VEC3;
......@@ -263,11 +263,11 @@ bool exportPlyPTMgeneric(typename PFP::MAP& map, const char* filename, const typ
out << "property float ny" << std::endl ;
out << "property float nz" << std::endl ;
for(unsigned int coefI = 0 ; coefI < nbCoefs ; ++coefI)
out << "property float L1_a" << coefI << std::endl ;
out << "property float C0_a" << coefI << std::endl ;
for(unsigned int coefI = 0 ; coefI < nbCoefs ; ++coefI)
out << "property float L2_a" << coefI << std::endl ;
out << "property float C1_a" << coefI << std::endl ;
for(unsigned int coefI = 0 ; coefI < nbCoefs ; ++coefI)
out << "property float L3_a" << coefI << std::endl ;
out << "property float C2_a" << coefI << std::endl ;
TREAL errL2 = map.template getAttribute<REAL>(VERTEX,"errL2") ;
TREAL errLmax = map.template getAttribute<REAL>(VERTEX,"errLmax") ;
......@@ -321,6 +321,283 @@ bool exportPlyPTMgeneric(typename PFP::MAP& map, const char* filename, const typ
return true ;
}
template <typename PFP>
bool exportPlySLFgeneric(typename PFP::MAP& map, const typename PFP::TVEC3& position, const char* filename, const FunctorSelect& good)
{
typedef typename PFP::MAP MAP;
typedef typename PFP::VEC3 VEC3;
typedef typename PFP::TVEC3 TVEC3;
typedef typename PFP::REAL REAL;
typedef typename PFP::TREAL TREAL;
std::ofstream out(filename, std::ios::out) ;
if (!out.good())
{
CGoGNerr << "Unable to open file " << filename << CGoGNendl ;
return false ;
}
AutoAttributeHandler<unsigned int> tableVertLab(map, VERTEX);
unsigned int nbDarts = map.getNbDarts() ;
std::vector<unsigned int> vertices;
std::vector<unsigned int> faces;
vertices.reserve(nbDarts/5); // TODO non optimal reservation
faces.reserve(nbDarts/3);
CellMarker markV(map, VERTEX);
TraversorF<MAP> t(map, good) ;
unsigned int lab = 0;
unsigned int nbf = 0;
for(Dart d = t.begin(); d != t.end(); d = t.next())
{
std::vector<unsigned int> face ;
Traversor2FV<typename PFP::MAP> tfv(map, d) ;
for(Dart it = tfv.begin(); it != tfv.end(); it = tfv.next())
{
if (!markV.isMarked(it))
{
markV.mark(it);
tableVertLab[it] = lab++;
vertices.push_back(map.getEmbedding(VERTEX, it));
}
face.push_back(tableVertLab[it]);
}
faces.push_back(face.size()) ;
for (unsigned int i = 0 ; i < face.size() ; ++i)
faces.push_back(face.at(i)) ;
++nbf;
}
TVEC3 frame[3] ;
std::vector<TVEC3> coefs ;
frame[0] = map.template getAttribute<VEC3>(VERTEX, "frame_T") ;
frame[1] = map.template getAttribute<VEC3>(VERTEX, "frame_B") ;
frame[2] = map.template getAttribute<VEC3>(VERTEX, "frame_N") ;
unsigned int i = 0 ;
do {
std::stringstream name ;
name << "SLFcoefs_" << i++ ;
coefs.push_back(map.template getAttribute<VEC3>(VERTEX, name.str())) ;
} while (coefs[i-1].isValid()) ;
const unsigned int nbCoefs = i - 1 ; // last valid one is i-2
for(unsigned int coefI = 0 ; coefI < nbCoefs ; ++coefI)
assert(coefs[coefI].isValid()) ;
std::string file(filename) ;
size_t pos = file.rfind(".") ; // position of "." in filename
std::string extension = file.substr(pos) ;
out << "ply" << std::endl ;
out << "format ascii 1.0" << std::endl ;
out << "comment ply SLF (K. Vanhoey generic format): SLF_" << (((extension == ".plyPTMext") || extension == ".plyPTMextBin" ) ? "PTMext" : "SHreal") << std::endl ;
out << "element vertex " << vertices.size() << std::endl ;
out << "property float x" << std::endl ;
out << "property float y" << std::endl ;
out << "property float z" << std::endl ;
out << "property float tx" << std::endl ;
out << "property float ty" << std::endl ;
out << "property float tz" << std::endl ;
out << "property float bx" << std::endl ;
out << "property float by" << std::endl ;
out << "property float bz" << std::endl ;
out << "property float nx" << std::endl ;
out << "property float ny" << std::endl ;
out << "property float nz" << std::endl ;
for(unsigned int coefI = 0 ; coefI < nbCoefs ; ++coefI)
out << "property float C0_" << coefI << std::endl ;
for(unsigned int coefI = 0 ; coefI < nbCoefs ; ++coefI)
out << "property float C1_" << coefI << std::endl ;
for(unsigned int coefI = 0 ; coefI < nbCoefs ; ++coefI)
out << "property float C2_" << coefI << std::endl ;
out << "element face " << nbf << std::endl ;
out << "property list uchar int vertex_indices" << std::endl ;
out << "end_header" << std::endl ;
for(unsigned int i = 0; i < vertices.size(); ++i)
{
unsigned int vi = vertices[i];
// position
for(unsigned int coord = 0 ; coord < 3 ; ++coord)
out << position[vi][coord] << " " ;
// frame
for(unsigned int axis = 0 ; axis < 3 ; ++axis)
for (unsigned int coord = 0 ; coord < 3 ; ++coord)
out << frame[axis][vi][coord] << " " ;
// coefficients
for (unsigned int channel = 0 ; channel < 3 ; ++channel)
for(unsigned int coefI = 0 ; coefI < nbCoefs ; ++coefI)
out << coefs[coefI][vi][channel] << " " ;
out << std::endl ;
}
std::vector<unsigned int>::iterator it = faces.begin();
while (it != faces.end())
{
unsigned int nbe = *it++;
out << nbe ;
for(unsigned int j = 0; j < nbe; ++j)
out << " " << *it++;
out << std::endl ;
}
out.close() ;
return true ;
}
template <typename PFP>
bool exportPlySLFgenericBin(typename PFP::MAP& map, const typename PFP::TVEC3& position, const char* filename, const FunctorSelect& good)
{
typedef typename PFP::MAP MAP;
typedef typename PFP::VEC3 VEC3;
typedef typename PFP::TVEC3 TVEC3;
typedef typename PFP::REAL REAL;
typedef typename PFP::TREAL TREAL;
std::ofstream out(filename, std::ios::out) ;
if (!out.good())
{
CGoGNerr << "Unable to open file " << filename << CGoGNendl ;
return false ;
}
AutoAttributeHandler<unsigned int> tableVertLab(map, VERTEX);
unsigned int nbDarts = map.getNbDarts() ;
std::vector<unsigned int> vertices;
std::vector<unsigned int> faces;
vertices.reserve(nbDarts/5); // TODO non optimal reservation
faces.reserve(nbDarts/3);
CellMarker markV(map, VERTEX);
TraversorF<MAP> t(map, good) ;
unsigned int lab = 0;
unsigned int nbf = 0;
for(Dart d = t.begin(); d != t.end(); d = t.next())
{
std::vector<unsigned int> face ;
Traversor2FV<typename PFP::MAP> tfv(map, d) ;
for(Dart it = tfv.begin(); it != tfv.end(); it = tfv.next())
{
if (!markV.isMarked(it))
{
markV.mark(it);
tableVertLab[it] = lab++;
vertices.push_back(map.getEmbedding(VERTEX, it));
}
face.push_back(tableVertLab[it]);
}
faces.push_back(face.size()) ;
for (unsigned int i = 0 ; i < face.size() ; ++i)
faces.push_back(face.at(i)) ;
++nbf;
}
TVEC3 frame[3] ;
std::vector<TVEC3> coefs ;
frame[0] = map.template getAttribute<VEC3>(VERTEX, "frame_T") ;
frame[1] = map.template getAttribute<VEC3>(VERTEX, "frame_B") ;
frame[2] = map.template getAttribute<VEC3>(VERTEX, "frame_N") ;
unsigned int i = 0 ;
do {
std::stringstream name ;
name << "SLFcoefs_" << i++ ;
coefs.push_back(map.template getAttribute<VEC3>(VERTEX, name.str())) ;
} while (coefs[i-1].isValid()) ;
const unsigned int nbCoefs = i - 1 ; // last valid one is i-2
for(unsigned int coefI = 0 ; coefI < nbCoefs ; ++coefI)
assert(coefs[coefI].isValid()) ;
std::string file(filename) ;
size_t pos = file.rfind(".") ; // position of "." in filename
std::string extension = file.substr(pos) ;
out << "ply" << std::endl ;
out << "format ascii 1.0" << std::endl ;
out << "comment ply SLF (K. Vanhoey generic format): SLF_" << ((extension == ".plyPTMext") ? "PTMext" : "SHreal") << std::endl ;
out << "element vertex " << vertices.size() << std::endl ;
out << "property float x" << std::endl ;
out << "property float y" << std::endl ;
out << "property float z" << std::endl ;
out << "property float tx" << std::endl ;
out << "property float ty" << std::endl ;
out << "property float tz" << std::endl ;
out << "property float bx" << std::endl ;
out << "property float by" << std::endl ;
out << "property float bz" << std::endl ;
out << "property float nx" << std::endl ;
out << "property float ny" << std::endl ;
out << "property float nz" << std::endl ;
for(unsigned int coefI = 0 ; coefI < nbCoefs ; ++coefI)
out << "property float C0_" << coefI << std::endl ;
for(unsigned int coefI = 0 ; coefI < nbCoefs ; ++coefI)
out << "property float C1_" << coefI << std::endl ;
for(unsigned int coefI = 0 ; coefI < nbCoefs ; ++coefI)
out << "property float C2_" << coefI << std::endl ;
out << "element face " << nbf << std::endl ;
out << "property list uchar int vertex_indices" << std::endl ;
out << "end_header" << std::endl ;
for(unsigned int i = 0; i < vertices.size(); ++i)
{
unsigned int vi = vertices[i];
// position
for(unsigned int coord = 0 ; coord < 3 ; ++coord)
{
const float& floatofdouble = position[vi][coord] ;
out.write((char*)(&floatofdouble), sizeof(float)) ;
}
// frame
for(unsigned int axis = 0 ; axis < 3 ; ++axis)
for (unsigned int coord = 0 ; coord < 3 ; ++coord)
{
const float& floatofdouble = frame[axis][vi][coord] ;
out.write((char*)(&floatofdouble), sizeof(float)) ;
}
// coefficients
for (unsigned int channel = 0 ; channel < 3 ; ++channel)
for(unsigned int coefI = 0 ; coefI < nbCoefs ; ++coefI)
{
const float& floatofdouble = coefs[coefI][vi][channel] ;
out.write((char*)(&floatofdouble), sizeof(float)) ;
}
}
std::vector<unsigned int>::iterator it = faces.begin();
while (it != faces.end())
{
unsigned int nbe = *it++;
out.write((char*)&nbe, sizeof(unsigned int)) ;
for(unsigned int j = 0; j < nbe; ++j)
{
unsigned int index = *it++ ;
out.write((char*)(&index), sizeof(unsigned int)) ;
}
}
out.close() ;
return true ;
}
template <typename PFP>
bool exportPLYPTM(typename PFP::MAP& map, const char* filename, const typename PFP::TVEC3& position, const typename PFP::TVEC3 frame[3], const typename PFP::TVEC3 colorPTM[6], const FunctorSelect& good)
{
......
......@@ -52,7 +52,7 @@ namespace Import
namespace ImportSurfacique
{
enum ImportType { UNKNOWNSURFACE, TRIAN, TRIANBGZ, PLY, PLYPTM, PLYPTMgeneric, OFF, OBJ, VRML, AHEM };
enum ImportType { UNKNOWNSURFACE, TRIAN, TRIANBGZ, MESHBIN, PLY, PLYPTM, PLYSLFgeneric, PLYSLFgenericBin, OFF, OBJ, VRML, AHEM };
}
namespace ImportVolumique
......@@ -109,12 +109,16 @@ public:
bool importOff(const std::string& filename, std::vector<std::string>& attrNames);
bool importMeshBin(const std::string& filename, std::vector<std::string>& attrNames);
bool importObj(const std::string& filename, std::vector<std::string>& attrNames);
bool importPly(const std::string& filename, std::vector<std::string>& attrNames);
bool importPlyPTM(const std::string& filename, std::vector<std::string>& attrNames);
bool importPlyPTMgeneric(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
......
......@@ -52,9 +52,18 @@ ImportSurfacique::ImportType MeshTablesSurface<PFP>::getFileType(const std::stri
if ((filename.rfind(".trian")!=std::string::npos) || (filename.rfind(".TRIAN")!=std::string::npos))
return ImportSurfacique::TRIAN;
if ((filename.rfind(".meshbin")!=std::string::npos) || (filename.rfind(".MESHBIN")!=std::string::npos))
return ImportSurfacique::MESHBIN;
if ((filename.rfind(".plyptm")!=std::string::npos) || (filename.rfind(".PLYGEN")!=std::string::npos))
return ImportSurfacique::PLYPTM;
if ((filename.rfind(".plyPTMextBin")!=std::string::npos) || (filename.rfind(".plySHrealBin")!=std::string::npos))
return ImportSurfacique::PLYSLFgenericBin;
if ((filename.rfind(".plyPTMext")!=std::string::npos) || (filename.rfind(".plySHreal")!=std::string::npos))
return ImportSurfacique::PLYSLFgeneric;
if ((filename.rfind(".ply")!=std::string::npos) || (filename.rfind(".PLY")!=std::string::npos))
return ImportSurfacique::PLY;
......@@ -92,6 +101,10 @@ bool MeshTablesSurface<PFP>::importMesh(const std::string& filename, std::vector
CGoGNout << "TYPE: OFF" << CGoGNendl;
return importOff(filename, attrNames);
break;
case ImportSurfacique::MESHBIN:
CGoGNout << "TYPE: MESHBIN" << CGoGNendl;
return importMeshBin(filename, attrNames);
break;
case ImportSurfacique::PLY:
CGoGNout << "TYPE: PLY" << CGoGNendl;
return importPly(filename, attrNames);
......@@ -100,10 +113,15 @@ bool MeshTablesSurface<PFP>::importMesh(const std::string& filename, std::vector
CGoGNout << "TYPE: PLYPTM" << CGoGNendl;
return importPlyPTM(filename, attrNames);
break;
case ImportSurfacique::PLYPTMgeneric:
CGoGNout << "TYPE: PLYPTMgeneric" << CGoGNendl;
return importPlyPTMgeneric(filename, attrNames);
case ImportSurfacique::PLYSLFgeneric:
CGoGNout << "TYPE: PLYSLFgeneric" << CGoGNendl;
return importPlySLFgeneric(filename, attrNames);
break;
case ImportSurfacique::PLYSLFgenericBin:
CGoGNout << "TYPE: PLYSLFgenericBin" << CGoGNendl;
return importPlySLFgenericBin(filename, attrNames);
break;
case ImportSurfacique::OBJ:
CGoGNout << "TYPE: OBJ" << CGoGNendl;
return importObj(filename, attrNames);
......@@ -360,6 +378,75 @@ bool MeshTablesSurface<PFP>::importOff(const std::string& filename, std::vector<
return true;
}
template<typename PFP>
bool MeshTablesSurface<PFP>::importMeshBin(const std::string& filename, std::vector<std::string>& attrNames)
{
AttributeHandler<typename PFP::VEC3> positions = m_map.template getAttribute<typename PFP::VEC3>(VERTEX, "position") ;
if (!positions.isValid())
positions = m_map.template addAttribute<typename PFP::VEC3>(VERTEX, "position") ;
attrNames.push_back(positions.name()) ;
AttributeContainer& container = m_map.getAttributeContainer(VERTEX) ;
// open file
std::ifstream fp(filename.c_str(), std::ios::in | std::ios::binary);
if (!fp.good())
{
CGoGNerr << "Unable to open file " << filename << CGoGNendl;
return false;
}
// Read header
unsigned int Fmin, Fmax ;
fp.read((char*)&m_nbVertices, sizeof(unsigned int)) ;
fp.read((char*)&m_nbFaces, sizeof(unsigned int)) ;
fp.read((char*)&Fmin, sizeof(unsigned int)) ;
fp.read((char*)&Fmax, sizeof(unsigned int)) ;
assert((Fmin == 3 && Fmax == 3) || !"Only triangular faces are handled yet") ;
// Read foreach vertex
std::vector<unsigned int> verticesID ;
verticesID.reserve(m_nbVertices) ;
for (unsigned int vxNum = 0 ; vxNum < m_nbVertices ; ++vxNum)
{
VEC3 pos ;
fp.read((char*) &pos[0], sizeof(float)) ;
fp.read((char*) &pos[1], sizeof(float)) ;
fp.read((char*) &pos[2], sizeof(float)) ;
unsigned int id = container.insertLine() ;
positions[id] = pos ;
verticesID.push_back(id) ;
}
// Read foreach face
m_nbEdges.reserve(m_nbFaces) ;
m_emb.reserve(m_nbVertices * 8) ;
for (unsigned int fNum = 0; fNum < m_nbFaces; ++fNum)
{
const unsigned int faceSize = 3 ;
fp.read((char*) &faceSize, sizeof(float)) ;
m_nbEdges.push_back(faceSize) ;
for (unsigned int i = 0 ; i < faceSize; ++i)
{
unsigned int index ; // index of embedding
fp.read((char*) &index, sizeof(unsigned int)) ;
m_emb.push_back(verticesID[index]) ;
}
}
fp.close() ;
return true ;
}
template <typename PFP>
bool MeshTablesSurface<PFP>::importObj(const std::string& filename, std::vector<std::string>& attrNames)
{
......@@ -504,6 +591,14 @@ bool MeshTablesSurface<PFP>::importPly(const std::string& filename, std::vector<
return false;
}
AttributeHandler<typename PFP::VEC3> colors = m_map.template getAttribute<typename PFP::VEC3>(VERTEX, "color") ;
if (pid.hasColors())
{
if(!colors.isValid())
colors = m_map.template addAttribute<typename PFP::VEC3>(VERTEX, "color") ;
attrNames.push_back(colors.name()) ;
}
// lecture des nombres de sommets/aretes/faces
m_nbVertices = pid.nbVertices();
m_nbFaces = pid.nbFaces();
......@@ -519,6 +614,16 @@ bool MeshTablesSurface<PFP>::importPly(const std::string& filename, std::vector<
unsigned int id = container.insertLine();
positions[id] = pos;
if (pid.hasColors())
{
Geom::Vector<3, unsigned char> col ;
pid.vertexColorUint8(i, col) ;
colors[id][0] = col[0] ;
colors[id][1] = col[1] ;
colors[id][2] = col[2] ;
colors[id] /= 255.0 ;
}
verticesID.push_back(id);
}
......@@ -540,26 +645,28 @@ bool MeshTablesSurface<PFP>::importPly(const std::string& filename, std::vector<
}
/**
* Import plyPTM (K Vanhoey generic format).
* It can handle bivariable polynomials of any degree and returns the appropriate attrNames
* Import plySLF (K Vanhoey generic format).
* It can handle bivariable polynomials and spherical harmonics of any degree and returns the appropriate attrNames
* @param filename the file to import;
* @param attrNames reference that will be filled with the attribute names
* the number of attrNames returned depends on the degree of the polynomials :
* the number of attrNames returned depends on the degree of the polynomials / level of the SH :
* - 1 attrName for geometric position (VEC3) : name = "position" ;
* - 3 attrNames for local frame (3xVEC3) : names are "Frame_T" (Tangent), "Frame_B" (Binormal) and "Frame_N" (Normal) ;
* - N attrNames for the function coefficients (NxVEC3) : N RGB coefficients being successively the constants, the linears (v then u), the quadratics, etc. : : a0 + a1*v + a2*u + a3*u*v + a4*v^2 + a5*u^2.
* Their names are : "colorPTM_a<i>" (where <i> is a number from 0 to N-1).
* Their names are : "SLFcoefs_<i>" (where <i> is a number from 0 to N-1).
* N = 1 for constant polynomial,
* N = 3 for linear polynomial,
* N = 6 for quadratic polynomial,
* N = 10 for cubic degree polynomial,
* N = 15 for 4th degree polynomial,
*
* N = l*l for SH of level l,
* ...
* - K remaining attrNames named "remainderNo<k>" where k is an integer from 0 to K-1.
* @return bool : success.
*/
template <typename PFP>
bool MeshTablesSurface<PFP>::importPlyPTMgeneric(const std::string& filename, std::vector<std::string>& attrNames)
bool MeshTablesSurface<PFP>::importPlySLFgeneric(const std::string& filename, std::vector<std::string>& attrNames)
{
// Open file
std::ifstream fp(filename.c_str(), std::ios::in) ;
......@@ -591,7 +698,7 @@ bool MeshTablesSurface<PFP>::importPlyPTMgeneric(const std::string& filename, st
bool binormal = false ;
bool normal = false ;
unsigned int nbProps = 0 ; // # properties
unsigned int nbCoefsPerPol = 0 ; // # coefficients per polynomial
unsigned int nbCoefs = 0 ; // # coefficients per polynomial
do // go to #faces and count #properties
{
fp >> tag ;
......@@ -606,12 +713,12 @@ bool MeshTablesSurface<PFP>::importPlyPTMgeneric(const std::string& filename, st