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

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

* 'master' of /home/untereiner/CGoGN:
  ihm3 + stage_shader
parents 3a3f7966 3c4647fb
...@@ -189,14 +189,6 @@ void StageShader::importMesh(std::string& filename) ...@@ -189,14 +189,6 @@ void StageShader::importMesh(std::string& filename)
else else
position = myMap.getAttribute<PFP::VEC3>(VERTEX , attrNames[0]) ; position = myMap.getAttribute<PFP::VEC3>(VERTEX , attrNames[0]) ;
} }
else
{
position = myMap.addAttribute<PFP::VEC3>(VERTEX, "position");
Algo::Modelisation::Primitive3D<PFP> prim(myMap, position);
prim.hexaGrid_topo(10,10,10);
prim.embedHexaGrid(1.0f,1.0f,1.0f);
}
updateVBOprimitives(Algo::Render::GL2::TRIANGLES | Algo::Render::GL2::LINES | Algo::Render::GL2::POINTS) ; updateVBOprimitives(Algo::Render::GL2::TRIANGLES | Algo::Render::GL2::LINES | Algo::Render::GL2::POINTS) ;
...@@ -316,6 +308,13 @@ int main(int argc, char** argv) ...@@ -316,6 +308,13 @@ int main(int argc, char** argv)
std::string filename(argv[1]) ; std::string filename(argv[1]) ;
sqt.importMesh(filename) ; sqt.importMesh(filename) ;
} }
else
{
sqt.position = sqt.myMap.addAttribute<PFP::VEC3>(VERTEX, "position");
Algo::Modelisation::Primitive3D<PFP> prim(sqt.myMap, sqt.position);
prim.hexaGrid_topo(10,10,10);
prim.embedHexaGrid(1.0f,1.0f,1.0f);
}
sqt.initGUI() ; sqt.initGUI() ;
......
...@@ -32,7 +32,7 @@ namespace IHM ...@@ -32,7 +32,7 @@ namespace IHM
{ {
/*************************************************** /***************************************************
* ATTRIBUTES MANAGEMENT * * ATTRIBUTES MANAGEMENT *
***************************************************/ ***************************************************/
template <typename T> template <typename T>
...@@ -64,7 +64,7 @@ AttributeHandler_IHM<T> ImplicitHierarchicalMap3::getAttribute(unsigned int orbi ...@@ -64,7 +64,7 @@ AttributeHandler_IHM<T> ImplicitHierarchicalMap3::getAttribute(unsigned int orbi
} }
/*************************************************** /***************************************************
* MAP TRAVERSAL * * MAP TRAVERSAL *
***************************************************/ ***************************************************/
inline Dart ImplicitHierarchicalMap3::newDart() inline Dart ImplicitHierarchicalMap3::newDart()
......
...@@ -166,40 +166,6 @@ unsigned int ImplicitHierarchicalMap3::faceLevel(Dart d) ...@@ -166,40 +166,6 @@ unsigned int ImplicitHierarchicalMap3::faceLevel(Dart d)
return fLevel ; return fLevel ;
} }
// Dart it = d ;
// Dart old = it ;
// unsigned int fLevel = edgeLevel(it) ;
// do
// {
// it = phi1(it) ;
// if(m_dartLevel[it] < m_dartLevel[old]) // in a first time, the level of a face
// old = it ; // is the minimum of the levels
// unsigned int l = edgeLevel(it) ; // of its edges
// fLevel = l < fLevel ? l : fLevel ;
// } while(it != d) ;
//
// unsigned int cur = m_curLevel ;
// m_curLevel = fLevel ;
//
// unsigned int nbSubd = 0 ;
// it = old ;
// unsigned int eId = m_edgeId[old] ; // the particular case of a face
// do // with all neighboring faces regularly subdivided
// { // but not the face itself
// ++nbSubd ; // is treated here
// it = phi1(it) ;
// } while(m_edgeId[it] == eId) ;
//
// while(nbSubd > 1)
// {
// nbSubd /= 2 ;
// --fLevel ;
// }
//
// m_curLevel = cur ;
//
// return fLevel ;
unsigned int ImplicitHierarchicalMap3::volumeLevel(Dart d) unsigned int ImplicitHierarchicalMap3::volumeLevel(Dart d)
{ {
...@@ -231,8 +197,6 @@ unsigned int ImplicitHierarchicalMap3::volumeLevel(Dart d) ...@@ -231,8 +197,6 @@ unsigned int ImplicitHierarchicalMap3::volumeLevel(Dart d)
{ {
Dart e = *face ; Dart e = *face ;
//std::cout << "dart from face = " << e << std::endl;
// in a first time, the level of a face // in a first time, the level of a face
//the level of the volume is the minimum of the //the level of the volume is the minimum of the
//levels of its faces //levels of its faces
...@@ -298,7 +262,6 @@ unsigned int ImplicitHierarchicalMap3::volumeLevel(Dart d) ...@@ -298,7 +262,6 @@ unsigned int ImplicitHierarchicalMap3::volumeLevel(Dart d)
do do
{ {
Dart ee = phi2(e) ; Dart ee = phi2(e) ;
//std::cout << "\t face a cote =" << ee << std::endl;
if(!mark.isMarked(ee)) // not already marked if(!mark.isMarked(ee)) // not already marked
{ {
visitedFaces.push_back(ee) ; visitedFaces.push_back(ee) ;
...@@ -308,7 +271,6 @@ unsigned int ImplicitHierarchicalMap3::volumeLevel(Dart d) ...@@ -308,7 +271,6 @@ unsigned int ImplicitHierarchicalMap3::volumeLevel(Dart d)
} while(e != *face) ; } while(e != *face) ;
} }
//std::cout << "fin" << std::endl << std::endl;
//Second : the case of all faces regularly subdivided but not the volume itself //Second : the case of all faces regularly subdivided but not the volume itself
unsigned int cur = m_curLevel ; unsigned int cur = m_curLevel ;
...@@ -336,16 +298,6 @@ unsigned int ImplicitHierarchicalMap3::volumeLevel(Dart d) ...@@ -336,16 +298,6 @@ unsigned int ImplicitHierarchicalMap3::volumeLevel(Dart d)
return vLevel; return vLevel;
} }
// unsigned int fLevel = faceLevel(e) ;
// vLevel = fLevel < vLevel ? fLevel : vLevel ;
//
// Dart old = faceOldestDart(e);
// if(m_dartLevel[old] < m_dartLevel[oldest])
// oldest = old ;
Dart ImplicitHierarchicalMap3::faceOldestDart(Dart d) Dart ImplicitHierarchicalMap3::faceOldestDart(Dart d)
{ {
......
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