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

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

* 'master' of /home/kraemer/CGoGN:
  Mise a jour d'autres fonctions d'import pour le moment de la récupération du container (pour rester cohérent avec les autres fonctions)
parents 564c44b6 eb0c7fdf
...@@ -59,10 +59,11 @@ bool importInESS(typename PFP::MAP& map, const std::string& filename, std::vecto ...@@ -59,10 +59,11 @@ bool importInESS(typename PFP::MAP& map, const std::string& filename, std::vecto
{ {
typedef typename PFP::VEC3 VEC3; typedef typename PFP::VEC3 VEC3;
AttribContainer& container = map.getAttributeContainer(VERTEX_CELL) ;
AttributeHandler<VEC3> position = map.template addAttribute<VEC3>(VERTEX_ORBIT, "position") ; AttributeHandler<VEC3> position = map.template addAttribute<VEC3>(VERTEX_ORBIT, "position") ;
attrNames.push_back(position.name()) ; attrNames.push_back(position.name()) ;
AttribContainer& container = map.getAttributeContainer(VERTEX_CELL) ;
// open file // open file
std::ifstream fp(filename.c_str(), std::ios::in); std::ifstream fp(filename.c_str(), std::ios::in);
if (!fp.good()) if (!fp.good())
......
...@@ -39,11 +39,12 @@ bool importOFFWithELERegions(typename PFP::MAP& map, const std::string& filename ...@@ -39,11 +39,12 @@ bool importOFFWithELERegions(typename PFP::MAP& map, const std::string& filename
{ {
typedef typename PFP::VEC3 VEC3; typedef typename PFP::VEC3 VEC3;
AttribContainer& container = map.getAttributeContainer(VERTEX_CELL) ;
AttributeHandler<VEC3> position = map.template addAttribute<VEC3>(VERTEX_ORBIT, "position") ; AttributeHandler<VEC3> position = map.template addAttribute<VEC3>(VERTEX_ORBIT, "position") ;
attrNames.push_back(position.name()) ; attrNames.push_back(position.name()) ;
unsigned int m_nbVertices=0, m_nbFaces=0, m_nbEdges=0, m_nbVolumes=0; AttribContainer& container = map.getAttributeContainer(VERTEX_CELL) ;
unsigned int m_nbVertices = 0, m_nbFaces = 0, m_nbEdges = 0, m_nbVolumes = 0;
AutoAttributeHandler< NoMathIONameAttribute< std::vector<Dart> > > vecDartsPerVertex(map, VERTEX_ORBIT, "incidents"); AutoAttributeHandler< NoMathIONameAttribute< std::vector<Dart> > > vecDartsPerVertex(map, VERTEX_ORBIT, "incidents");
......
...@@ -37,11 +37,12 @@ bool importTet(typename PFP::MAP& map, const std::string& filename, std::vector< ...@@ -37,11 +37,12 @@ bool importTet(typename PFP::MAP& map, const std::string& filename, std::vector<
{ {
typedef typename PFP::VEC3 VEC3; typedef typename PFP::VEC3 VEC3;
AttribContainer& container = map.getAttributeContainer(VERTEX_CELL) ;
AttributeHandler<VEC3> position = map.template addAttribute<VEC3>(VERTEX_ORBIT, "position") ; AttributeHandler<VEC3> position = map.template addAttribute<VEC3>(VERTEX_ORBIT, "position") ;
attrNames.push_back(position.name()) ; attrNames.push_back(position.name()) ;
unsigned int m_nbVertices=0, m_nbFaces=0, m_nbEdges=0, m_nbVolumes=0; AttribContainer& container = map.getAttributeContainer(VERTEX_CELL) ;
unsigned int m_nbVertices = 0, m_nbFaces = 0, m_nbEdges = 0, m_nbVolumes = 0;
AutoAttributeHandler< NoMathIONameAttribute< std::vector<Dart> > > vecDartsPerVertex(map, VERTEX_ORBIT, "incidents"); AutoAttributeHandler< NoMathIONameAttribute< std::vector<Dart> > > vecDartsPerVertex(map, VERTEX_ORBIT, "incidents");
// open file // open file
...@@ -75,7 +76,7 @@ bool importTet(typename PFP::MAP& map, const std::string& filename, std::vector< ...@@ -75,7 +76,7 @@ bool importTet(typename PFP::MAP& map, const std::string& filename, std::vector<
do do
{ {
std::getline (fp, ligne); std::getline (fp, ligne);
} while (ligne.size()==0); } while (ligne.size() == 0);
std::stringstream oss(ligne); std::stringstream oss(ligne);
...@@ -102,7 +103,7 @@ bool importTet(typename PFP::MAP& map, const std::string& filename, std::vector< ...@@ -102,7 +103,7 @@ bool importTet(typename PFP::MAP& map, const std::string& filename, std::vector<
// lecture tetra // lecture tetra
// normalement m_nbVolumes*12 (car on ne charge que des tetra) // normalement m_nbVolumes*12 (car on ne charge que des tetra)
m_nbFaces=nbt*4; m_nbFaces = nbt*4;
std::cout << "nb points = " << m_nbVertices << " / nb faces = " << m_nbFaces << " / nb edges = " << m_nbEdges << " / nb tet = " << m_nbVolumes << std::endl; std::cout << "nb points = " << m_nbVertices << " / nb faces = " << m_nbFaces << " / nb edges = " << m_nbEdges << " / nb tet = " << m_nbVolumes << std::endl;
...@@ -146,7 +147,7 @@ bool importTet(typename PFP::MAP& map, const std::string& filename, std::vector< ...@@ -146,7 +147,7 @@ bool importTet(typename PFP::MAP& map, const std::string& filename, std::vector<
//vecDartPtrEmb[pt[j]].push_back(dd); //vecDartPtrEmb[pt[j]].push_back(dd);
vecDartsPerVertex[pt[j]].push_back(dd); vecDartsPerVertex[pt[j]].push_back(dd);
dd = map.phi1(map.phi2(dd)); dd = map.phi1(map.phi2(dd));
} while(dd!=d); } while(dd != d);
d = map.phi1(d); d = map.phi1(d);
......
...@@ -43,13 +43,14 @@ bool importTs(typename PFP::MAP& map, const std::string& filename, std::vector<s ...@@ -43,13 +43,14 @@ bool importTs(typename PFP::MAP& map, const std::string& filename, std::vector<s
typedef typename PFP::VEC3 VEC3; typedef typename PFP::VEC3 VEC3;
typedef typename PFP::REAL REAL; typedef typename PFP::REAL REAL;
AttribContainer& container = map.getAttributeContainer(VERTEX_CELL) ;
AttributeHandler<VEC3> position = map.template addAttribute<VEC3>(VERTEX_ORBIT, "position") ; AttributeHandler<VEC3> position = map.template addAttribute<VEC3>(VERTEX_ORBIT, "position") ;
attrNames.push_back(position.name()) ; attrNames.push_back(position.name()) ;
AttributeHandler<REAL> scalaire = map.template addAttribute<REAL>(VERTEX_ORBIT, "scalar"); AttributeHandler<REAL> scalaire = map.template addAttribute<REAL>(VERTEX_ORBIT, "scalar");
attrNames.push_back(scalaire.name()) ; attrNames.push_back(scalaire.name()) ;
unsigned int m_nbVertices=0, m_nbFaces=0, m_nbEdges=0, m_nbVolumes=0; AttribContainer& container = map.getAttributeContainer(VERTEX_CELL) ;
unsigned int m_nbVertices = 0, m_nbFaces = 0, m_nbEdges = 0, m_nbVolumes = 0;
AutoAttributeHandler< NoMathIONameAttribute< std::vector<Dart> > > vecDartsPerVertex(map, VERTEX_ORBIT, "incidents"); AutoAttributeHandler< NoMathIONameAttribute< std::vector<Dart> > > vecDartsPerVertex(map, VERTEX_ORBIT, "incidents");
// open file // open file
......
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