Commit e17b71cb authored by Pierre Kraemer's avatar Pierre Kraemer

import MRDAT add comments

parent 3dd929f4
......@@ -77,7 +77,8 @@ bool importMRDAT(typename PFP::MAP& map, const std::string& filename, std::vecto
oss >> s ;
oss >> depth ;
}
std::cout << "MR depth -> " << depth << std::endl ;
std::cout << " MR depth -> " << depth << std::endl ;
// read vertices
nextNonEmptyLine(fp, line) ;
......@@ -88,6 +89,8 @@ bool importMRDAT(typename PFP::MAP& map, const std::string& filename, std::vecto
return false ;
}
std::cout << " Read vertices.." << std::flush ;
std::vector<unsigned int> verticesID ;
nextNonEmptyLine(fp, line) ;
......@@ -111,6 +114,9 @@ bool importMRDAT(typename PFP::MAP& map, const std::string& filename, std::vecto
nextNonEmptyLine(fp, line) ;
}
std::cout << "..done" << std::endl ;
std::cout << " Read triangles (build quadtree).." << std::flush ;
QuadTree<PFP> qt ;
QuadTreeNode<PFP>* current = NULL ;
unsigned int prevNum = -1 ;
......@@ -170,8 +176,12 @@ bool importMRDAT(typename PFP::MAP& map, const std::string& filename, std::vecto
nextNonEmptyLine(fp, line) ;
}
std::cout << "..done" << std::endl ;
fp.close() ;
std::cout << " Create base level mesh.." << std::flush ;
AutoAttributeHandler< NoMathIONameAttribute< std::vector<Dart> > > vecDartsPerVertex(map, VERTEX, "incidents") ;
DartMarkerNoUnmark m(map) ;
......@@ -233,9 +243,15 @@ bool importMRDAT(typename PFP::MAP& map, const std::string& filename, std::vecto
return false ;
}
std::cout << "..done" << std::endl ;
std::cout << " Create finer resolution levels.." << std::flush ;
for(unsigned int i = 0; i < depth; ++i)
map.addNewLevel(false) ;
std::cout << "..done" << std::endl ;
std::cout << " Embed finer resolution levels.." << std::flush ;
map.setCurrentLevel(0) ;
qt.embed(map, verticesID) ;
map.setCurrentLevel(map.getMaxLevel()) ;
......@@ -258,6 +274,8 @@ bool importMRDAT(typename PFP::MAP& map, const std::string& filename, std::vecto
}
}
std::cout << "..done" << std::endl ;
return true ;
}
......
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