Commit e7780e3e authored by Thomas Pitiot 's avatar Thomas Pitiot

attention on va tout changer

parent a1267f46
......@@ -151,9 +151,9 @@ inline bool removeElementFromVector(std::vector<T>& a, T ag)
inline std::vector<Dart> EnvMap::getMemoCross(const VEC3& pos, const VEC3& dest, Dart& d1)
{
CGoGN::Algo::Volume::MovingObjects::ParticleCell3DMemo<PFP> * registering_part = new CGoGN::Algo::Volume::MovingObjects::ParticleCell3DMemo<PFP>(map, d1,pos,position);
CGoGN::Algo::Volume::MovingObjects::ParticleCell3DMemo<PFP> registering_part (map, d1,pos,position);
std::vector<Dart> result =(registering_part->move(dest));
std::vector<Dart> result =(registering_part.move(dest));
// d2=registering_part->d;
// CGoGNout<<"d1 : "<< *d1<<"|| d2 : "<< *d2<<"|| start : "<< pos<<"|| stop : "<< dest<<CGoGNendl;
return result;
......
......@@ -270,7 +270,7 @@ void EnvMap::FirstRegistrationSegment(Segment * o)// réenregistre l'Segment en
if (mo != NULL)
{
int n1 = o->indexPart1;
int n2 = o->indexPart2;
// int n2 = o->indexPart2;
#ifdef DEBUG_affichage
CGoGNout<<"First Registration arete "<<o->index<<CGoGNendl;
#endif
......@@ -278,21 +278,21 @@ void EnvMap::FirstRegistrationSegment(Segment * o)// réenregistre l'Segment en
VEC3 p2 = o->p2;
Dart d1=mo->parts_[n1]->d;
Dart d2=mo->parts_[n2]->d;
// Dart d2=mo->parts_[n2]->d;
std::vector<Dart> memo;
memo = getMemoCross(p1,p2,d1);
if(map.sameVolume(d1,d2))
{
pushAOneCellSegment(o , d1);
}
else
{
// if(map.sameVolume(d1,d2))
// {
// pushAOneCellSegment(o , d1);
// }
// else
// {
pushSegmentInSetOfCells(o, memo);
}
// }
}
}
......@@ -627,7 +627,7 @@ bool EnvMap::subdivideVolume(Dart dglobal, bool OneLevelDifference)
const std::chrono::time_point<std::chrono::system_clock> endPop = std::chrono::system_clock::now();
duration_pop = endPop - startPop;
std::cout << "pop duration : " << duration_pop.count() << "s\n";
if(duration_pop.count()>0.035)std::cout << "pop duration : " << duration_pop.count() << "s\n";
const std::chrono::time_point<std::chrono::system_clock> startSubdiv = std::chrono::system_clock::now();
......@@ -639,7 +639,7 @@ bool EnvMap::subdivideVolume(Dart dglobal, bool OneLevelDifference)
const std::chrono::time_point<std::chrono::system_clock> endSubdiv = std::chrono::system_clock::now();
duration_subdiv = endSubdiv - startSubdiv;
std::cout << "subdiv duration : " << duration_subdiv.count() << "s\n";
if(duration_subdiv.count()>0.035)std::cout << "subdiv duration : " << duration_subdiv.count() << "s\n";
map.setCurrentLevel(map.getMaxLevel()) ;
// map.check();
......@@ -680,6 +680,8 @@ bool EnvMap::subdivideVolume(Dart dglobal, bool OneLevelDifference)
{
FirstRegistrationSegment(o) ;
}
const std::chrono::time_point<std::chrono::system_clock> endPushSegmentNeighbors = std::chrono::system_clock::now();
//same for obstacles contained
for (Segment * o : oldobst)
{
......@@ -690,8 +692,11 @@ bool EnvMap::subdivideVolume(Dart dglobal, bool OneLevelDifference)
const std::chrono::time_point<std::chrono::system_clock> endPush = std::chrono::system_clock::now();
duration_push = endPush - startPush;
std::cout << "push triangle duration : " << std::chrono::duration<double> (endPushTriangle - startPush).count() << "s\n";
std::cout << "push duration : " << duration_push.count() << "s\n";
std::chrono::duration<double> duration_triangle= (endPushTriangle - startPush);
std::chrono::duration<double> duration_segment= (endPush - endPushSegmentNeighbors);
std::chrono::duration<double> duration_segmentNeighbor= (endPushSegmentNeighbors - endPushTriangle);
if(duration_triangle.count()>0.035)std::cout << "push triangle duration : " << duration_triangle.count() << "s\n";
if(duration_push.count()>0.035)std::cout << "push duration : " << duration_push.count() << "\n dont pour les segments présents : "<<duration_segment.count() <<"s\n et pour les voisins :"<<duration_segmentNeighbor.count() <<"s\n";
#endif
......
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