Commit 56d8c1e8 authored by untereiner's avatar untereiner

entierely modifying level functions in IHM3

parent f02f5b6d
......@@ -131,17 +131,6 @@ public:
*************************************************************************/
//@{
//!
/*!
*
*/
Dart beginSplittingPath(Dart d, DartMarker& m);
//!
/*!
*
*/
void constructSplittingPath(Dart d, std::vector<Dart>& v, DartMarker& m);
//!
/*!
......@@ -160,36 +149,6 @@ public:
Dart quadranguleFace(Dart d);
void deleteVertexSubdividedFace(Dart d);
// //!
// /*!
// *
// */
// virtual Dart cutEdge(Dart d);
//
// //!
// /*!
// *
// */
// virtual bool uncutEdge(Dart d);
//
// //!
// /*!
// *
// */
// virtual void splitFace(Dart d, Dart e);
//
// //!
// /*!
// *
// */
// virtual void sewVolumes(Dart d, Dart e, bool withBoundary = true);
//
// //!
// /*!
// *
// */
// virtual void splitVolume(std::vector<Dart>& vd);
//@}
void computeVertexVertexFunctor(Dart d) { (*vertexVertexFunctor)(d); }
......@@ -322,18 +281,6 @@ public:
*/
bool edgeIsSubdivided(Dart d) ;
//! Return true if the face of d in the current level map
//! has already been subdivided to the next level
/*!
*/
bool faceIsSubdivided(Dart d) ;
//! Return true if the volume of d in the current level map
//! has already been subdivided to the next level
/*!
*/
bool volumeIsSubdivided(Dart d);
//! Return true if the edge of d in the current level map
//! is subdivided to the next level,
//! none of its resulting edges is in turn subdivided to the next level
......@@ -342,30 +289,41 @@ public:
*/
bool edgeCanBeCoarsened(Dart d);
//! Return true if the face of d in the current level map
//! has already been subdivided to the next level
/*!
*/
bool faceIsSubdivided(Dart d) ;
//!
/*!
*/
bool faceCanBeCoarsened(Dart d);
//!
//! Return true if the volume of d in the current level map
//! has already been subdivided to the next level
/*!
*/
bool faceIsSubdividedOnce(Dart d);
bool volumeIsSubdivided(Dart d);
//!
/*!
*/
bool volumeIsSubdividedOnce(Dart d);
/*! @name
*************************************************************************/
//!
/*!
*/
bool neighborhoodLevelOverOne(Dart d);
bool neighborhoodLevelDiffersMoreThanOne(Dart d);
//! wired !!!
/*!
*/
bool coarsenNeighborhoodLevelOverOne(Dart d);
bool coarsenNeighborhoodLevelDiffersMoreThanOne(Dart d);
//@}
/*! @name Cell Functors
......@@ -448,3 +406,9 @@ public:
#include "Algo/ImplicitHierarchicalMesh/ihm3.hpp"
#endif
////!
///*!
// */
//bool faceIsSubdividedOnce(Dart d);
......@@ -81,24 +81,24 @@ void subdivideFace(typename PFP::MAP& map, Dart d, AttributeHandler<typename PFP
unsigned int cur = map.getCurrentLevel() ;
map.setCurrentLevel(fLevel) ; // go to the level of the face to subdivide its edges
unsigned int vLevel = map.volumeLevel(old);
//one level of subdivision in the neighbordhood
Traversor3VW<typename PFP::MAP> trav3EW(map, old);
for(Dart dit = trav3EW.begin() ; dit != trav3EW.end() ; dit = trav3EW.next())
{
Dart oldit = map.volumeOldestDart(dit);
if(((vLevel+1) - map.volumeLevel(oldit)) > 1)
Algo::IHM::subdivideVolumeClassic<PFP>(map, oldit, position);
// Dart oldNeighbor = map.volumeOldestDart(map.phi3(old));
// unsigned int vLevel = map.volumeLevel(oldNeighbor);
//
// std::cout << "vLevel courant = " << map.volumeLevel(old) << std::endl;
// std::cout << "vLevel voisin = " << vLevel << std::endl;
// unsigned int vLevel = map.volumeLevel(old);
// //one level of subdivision in the neighbordhood
// Traversor3VW<typename PFP::MAP> trav3EW(map, old);
// for(Dart dit = trav3EW.begin() ; dit != trav3EW.end() ; dit = trav3EW.next())
// {
// Dart oldit = map.volumeOldestDart(dit);
// if(((vLevel+1) - map.volumeLevel(oldit)) > 1)
// Algo::IHM::subdivideVolumeClassic<PFP>(map, oldit, position);
//
// if((map.volumeLevel(old)+1) - (vLevel) > 1)
// Algo::IHM::subdivideVolumeClassic<PFP>(map, oldNeighbor, position);
}
//// Dart oldNeighbor = map.volumeOldestDart(map.phi3(old));
//// unsigned int vLevel = map.volumeLevel(oldNeighbor);
////
//// std::cout << "vLevel courant = " << map.volumeLevel(old) << std::endl;
//// std::cout << "vLevel voisin = " << vLevel << std::endl;
////
//// if((map.volumeLevel(old)+1) - (vLevel) > 1)
//// Algo::IHM::subdivideVolumeClassic<PFP>(map, oldNeighbor, position);
// }
unsigned int degree = 0 ;
typename PFP::VEC3 p ;
......@@ -431,7 +431,7 @@ template <typename PFP>
void coarsenFace(typename PFP::MAP& map, Dart d, AttributeHandler<typename PFP::VEC3, VERTEX>& position, SubdivideType sType)
{
assert(map.getDartLevel(d) <= map.getCurrentLevel() || !"Access to a dart introduced after current level") ;
assert(map.faceIsSubdividedOnce(d) || !"Trying to coarsen a non-subdivided face or a more than once subdivided face") ;
assert(map.faceCanBeCoarsened(d) || !"Trying to coarsen a non-subdivided face or a more than once subdivided face") ;
unsigned int cur = map.getCurrentLevel() ;
......
......@@ -191,7 +191,7 @@ public:
/**
* Drawing function for phi2 only
*/
void drawRelation3();
void drawRelation3(Geom::Vec4f c);
/**
* draw all topo
......
This diff is collapsed.
......@@ -233,13 +233,13 @@ void Topo3Render::drawRelation2()
}
void Topo3Render::drawRelation3()
void Topo3Render::drawRelation3(Geom::Vec4f c)
{
if (m_nbRel3==0)
return;
m_shader1->changeVA_VBO(m_vaId, m_vbo3);
m_shader1->setColor(Geom::Vec4f(1.0f,1.0f,0.0f,0.0f));
m_shader1->setColor(c);
m_shader1->enableVertexAttribs();
glDrawArrays(GL_QUADS, 0, m_nbRel3*4);
......@@ -262,7 +262,7 @@ void Topo3Render::drawTopo()
drawDarts();
drawRelation1();
drawRelation2();
drawRelation3();
drawRelation3(Geom::Vec4f(1.0f,1.0f,0.0f,0.0f));
}
......
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