Commit 005e0485 authored by Thomas Pitiot 's avatar Thomas Pitiot

bug de particule volume into volumeSpecialCase et particule memo ...

parent 19f808c6
...@@ -389,11 +389,9 @@ void EnvMap::FirstRegistrationSegment(Segment * o)// réenregistre l'Segment en ...@@ -389,11 +389,9 @@ void EnvMap::FirstRegistrationSegment(Segment * o)// réenregistre l'Segment en
VEC3 p1 = o->p1; VEC3 p1 = o->p1;
VEC3 p2 = o->p2; VEC3 p2 = o->p2;
Dart d1=NIL; Dart d1=mo->parts_[n1]->d;
Dart d2=NIL; Dart d2=mo->parts_[n2]->d;
std::vector<Dart> memo; std::vector<Dart> memo;
d1=mo->parts_[n1]->d;
d2=mo->parts_[n2]->d;
memo = getMemoCross(p1,p2,d1); memo = getMemoCross(p1,p2,d1);
...@@ -462,7 +460,7 @@ void EnvMap::pushSegmentInSetOfCells(Segment* o, const std::vector<Dart>& memo_c ...@@ -462,7 +460,7 @@ void EnvMap::pushSegmentInSetOfCells(Segment* o, const std::vector<Dart>& memo_c
#ifdef DEBUG_affichage #ifdef DEBUG_affichage
CGoGNout<<"Push in set of cells segment arete "<<n<<CGoGNendl; CGoGNout<<"Push in set of cells segment arete "<<n<<CGoGNendl;
#endif #endif
assert(!memo_cross.empty()); assert(!memo_cross.empty() && memo_cross.size() > 1);
ArticulatedObject * mo = o->nid; ArticulatedObject * mo = o->nid;
mo->belonging_cells[n] = memo_cross; mo->belonging_cells[n] = memo_cross;
...@@ -526,9 +524,11 @@ void EnvMap::popSegment(Segment* o) ...@@ -526,9 +524,11 @@ void EnvMap::popSegment(Segment* o)
bool EnvMap::subdivideVolume(Dart dglobal) bool EnvMap::subdivideVolume(Dart dglobal)
{ {
bool res =false;
#ifdef IHMap
unsigned int max = map.getMaxLevel() ; map.setCurrentLevel(map.getMaxLevel()) ;
map.setCurrentLevel(max) ;
unsigned int vLevel = map.volumeLevel(dglobal); unsigned int vLevel = map.volumeLevel(dglobal);
Dart old = map.volumeOldestDart(dglobal); Dart old = map.volumeOldestDart(dglobal);
...@@ -542,6 +542,9 @@ bool EnvMap::subdivideVolume(Dart dglobal) ...@@ -542,6 +542,9 @@ bool EnvMap::subdivideVolume(Dart dglobal)
{ {
if(map.volumeLevel(nv) == vLevel - 1) if(map.volumeLevel(nv) == vLevel - 1)
{ {
#ifdef DEBUG_affichage
std::cout << "cascade en : "<<nv<< std::endl;
#endif
subdivideVolume(nv); subdivideVolume(nv);
} }
} }
...@@ -550,10 +553,10 @@ bool EnvMap::subdivideVolume(Dart dglobal) ...@@ -550,10 +553,10 @@ bool EnvMap::subdivideVolume(Dart dglobal)
// on commence ensuite a subdiviser // on commence ensuite a subdiviser
bool res =false;
#ifdef IHMap
CGoGNout<<"debut refine"<<CGoGNendl; CGoGNout<<"debut refine"<<CGoGNendl;
map.setCurrentLevel(max) ; map.setCurrentLevel(map.getMaxLevel()) ;
#ifdef DEBUG_affichage #ifdef DEBUG_affichage
std::cout << "dglobal = " << dglobal << "level = "<< map.getDartLevel(dglobal) << std::endl; std::cout << "dglobal = " << dglobal << "level = "<< map.getDartLevel(dglobal) << std::endl;
......
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