From abed34a2a76d94cd8065b1b78a257cec17ca2df7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89tienne=20Schmitt?= Date: Fri, 20 Mar 2015 16:01:30 +0100 Subject: [PATCH] added getter method to access to the particules & to the cell MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Étienne Schmitt --- include/ArticulatedObject.h | 8 ++++-- include/surface.h | 14 ++++++++-- src/ArticulatedObject.cpp | 36 ++++++++++++------------- src/env_map.cpp | 54 ++++++++++++++++++------------------- src/knife.cpp | 30 ++++++++++++--------- src/needle.cpp | 36 +++++++++++++------------ src/tree.cpp | 4 +-- src/viewer.cpp | 28 +++++++++---------- 8 files changed, 115 insertions(+), 95 deletions(-) diff --git a/include/ArticulatedObject.h b/include/ArticulatedObject.h index 5a6d24e..ade9ce7 100644 --- a/include/ArticulatedObject.h +++ b/include/ArticulatedObject.h @@ -20,18 +20,22 @@ public : inline const VEC3& getPosition(int index) const { - return parts_[index]->getPosition(); + return getParticule(index)->getPosition(); } const VEC3& getPositionSegment(int index) const { - return parts_[(Segments_[index])->indexPart1]->getPosition(); + return getParticule((Segments_[index])->indexPart1)->getPosition(); } const Particule* getParticule(int index) const { return parts_[index]; } + Particule* getParticule(int index) + { + return parts_[index]; + } const Segment* getSegment(int index) const { diff --git a/include/surface.h b/include/surface.h index 14322e1..45211bf 100644 --- a/include/surface.h +++ b/include/surface.h @@ -27,9 +27,19 @@ public: Surface(Simulator* sim, VEC3 offset) ; ~Surface(); - const VEC3& getPosition(int index) const + inline const VEC3& getPosition(int index) const { - return parts_[index]->getPosition(); + return getParticule(index)->getPosition(); + } + + inline const Particule* getParticule(int index) const + { + return parts_[index]; + } + + inline Particule* getParticule(int index) + { + return parts_[index]; } diff --git a/src/ArticulatedObject.cpp b/src/ArticulatedObject.cpp index 8d6739d..8c8fadd 100644 --- a/src/ArticulatedObject.cpp +++ b/src/ArticulatedObject.cpp @@ -148,19 +148,19 @@ bool ArticulatedObject::removeGeneralNeighbor (Dart d) // default : n2 =(n+1)%(mo->nbVertices); break; // } // //////// -// VEC3 pos = mo->parts_[n]->getPosition(); -// VEC3 pos2 = mo->parts_[n2]->getPosition(); -// mo->parts_[n]->CGoGN::Algo::MovingObjects::ParticleBase::move(Algo::Volume::Geometry::faceCentroid(mo->sim_->envMap_.map, mo->parts_[n]->d, mo->sim_->envMap_.position)) ; +// VEC3 pos = mo->getParticule(n)->getPosition(); +// VEC3 pos2 = mo->getParticule(n2)->getPosition(); +// mo->getParticule(n]->CGoGN::Algo::MovingObjects::ParticleBase::move(Algo::Volume::Geometry::faceCentroid(mo->sim_->envMap_.map, mo->parts_[n)->getCell(), mo->sim_->envMap_.position)) ; // -// mo->parts_[n]->setState(VOLUME) ; -// mo->parts_[n]->move(pos) ; +// mo->getParticule(n)->setState(VOLUME) ; +// mo->getParticule(n)->move(pos) ; // -// mo->parts_[n2]->CGoGN::Algo::MovingObjects::ParticleBase::move(Algo::Volume::Geometry::faceCentroid(mo->sim_->envMap_.map, mo->parts_[n2]->d, mo->sim_->envMap_.position)) ; +// mo->getParticule(n2]->CGoGN::Algo::MovingObjects::ParticleBase::move(Algo::Volume::Geometry::faceCentroid(mo->sim_->envMap_.map, mo->parts_[n2)->getCell(), mo->sim_->envMap_.position)) ; // -// mo->parts_[n2]->setState(VOLUME) ; -// mo->parts_[n2]->move(pos2) ; +// mo->getParticule(n2)->setState(VOLUME) ; +// mo->getParticule(n2)->move(pos2) ; // -// mo->dDir = mo->parts_[0]->d; +// mo->dDir = mo->getParticule(0)->getCell(); // } //} // @@ -180,16 +180,16 @@ bool ArticulatedObject::removeGeneralNeighbor (Dart d) // default : n2 =(n+1)%(mo->nbVertices); break; // } // //////// -// VEC3 pos1 = mo->parts_[n]->getPosition(); -// VEC3 pos2 = mo->parts_[n2]->getPosition(); +// VEC3 pos1 = mo->getParticule(n)->getPosition(); +// VEC3 pos2 = mo->getParticule(n2)->getPosition(); //// if (Algo::Volume::Geometry::isPointInConvexFace2D (mo->sim_->envMap_.map, d1, mo->sim_->envMap_.position, pos1, true)) // if ( mo->sim_->envMap_.is_insideConvexCell2D(pos1, d1)) -// mo->parts_[n]->d = d1; +// mo->getParticule(n)->getCell() = d1; //// if (Algo::Volume::Geometry::isPointInConvexFace2D (mo->sim_->envMap_.map, d1, mo->sim_->envMap_.position, pos2, true)) // if ( mo->sim_->envMap_.is_insideConvexCell2D(pos2, d1)) -// mo->parts_[n2]->d = d1; +// mo->getParticule(n2)->getCell() = d1; // if(n==0) -// mo->dDir = mo->parts_[0]->d; +// mo->dDir = mo->getParticule(0)->getCell(); // } //} @@ -203,11 +203,11 @@ bool ArticulatedObject::removeGeneralNeighbor (Dart d) // int n2 = o->indexPart2; -// if (nid->parts_[n1]->d == nid->sim_->envMap_.map.phi1(d1)) -// nid->parts_[n1]->d = d1; +// if (nid->getParticule(n1)->getCell() == nid->sim_->envMap_.map.phi1(d1)) +// nid->getParticule(n1)->getCell() = d1; -// if (nid->parts_[n2]->d == nid->sim_->envMap_.map.phi1(d1)) -// nid->parts_[n2]->d = d1; +// if (nid->getParticule(n2)->getCell() == nid->sim_->envMap_.map.phi1(d1)) +// nid->getParticule(n2)->getCell() = d1; // } diff --git a/src/env_map.cpp b/src/env_map.cpp index c5fc0f6..9ed5165 100644 --- a/src/env_map.cpp +++ b/src/env_map.cpp @@ -277,8 +277,8 @@ void EnvMap::FirstRegistrationSegment(Segment * o)// réenregistre l'Segment en VEC3 p1 = o->p1; VEC3 p2 = o->p2; - Dart d1=mo->parts_[n1]->d; -// Dart d2=mo->parts_[n2]->d; + Dart d1=mo->getParticule(n1)->getCell(); +// Dart d2=mo->getParticule(n2)->getCell(); std::vector memo; @@ -304,7 +304,7 @@ Dart EnvMap::popAndPushSegment(Segment* o)// maj de l'enregistrement popSegment(o); FirstRegistrationSegment(o); - return o->nid->parts_[o->indexPart1]->d; + return o->nid->getParticule(o->indexPart1)->getCell(); } void EnvMap::pushAOneCellSegment(Segment * o, Dart d) @@ -439,10 +439,10 @@ void EnvMap::FirstRegistrationTriangle(Triangle * o)// réenregistre l'Triangle Dart cell2=mo->surfaceMap.phi1(e); // on récupère les aprticules correspondant a chaque edge du triangle a enregistrer - Particule * p1 = mo->parts_[mo->indexParticule[cell]]; + const Particule * p1 = mo->getParticule(mo->indexParticule[cell]); - Dart d1=p1->d; // darts de la carte 3D contenant les particules + Dart d1=p1->getCell(); // darts de la carte 3D contenant les particules memo = getMemoCross(p1->getPosition(),mo->positionSurface[cell2],d1); for (Dart d : memo) @@ -793,10 +793,10 @@ void EnvMap::resetPartSubdiv(Segment* o) if (mo != NULL) { - VEC3 pos = mo->parts_[o->indexPart1]->getPosition(); - VEC3 pos2 = mo->parts_[o->indexPart2]->getPosition(); - Dart d1 =mo->parts_[o->indexPart1]->d; - Dart d2 =mo->parts_[o->indexPart2]->d; + VEC3 pos = mo->getParticule(o->indexPart1)->getPosition(); + VEC3 pos2 = mo->getParticule(o->indexPart2)->getPosition(); + Dart d1 =mo->getParticule(o->indexPart1)->getCell(); + Dart d2 =mo->getParticule(o->indexPart2)->getCell(); #ifdef DEBUG_affichage CGoGNout<<"Reset part subdiv (index articul , segment ,ind1, pos1, d1, ind2, pos2, d2) : "<index_articulated<<" || "<index<<" || "<indexPart1<<" || "<indexPart2<<" || "<parts_[o->indexPart1]->CGoGN::Algo::MovingObjects::ParticleBase::move(Algo::Surface::Geometry::volumeCentroid>(map,d1,position)) ; - mo->parts_[o->indexPart1]->reset_positionFace(); + mo->getParticule(o->indexPart1)->CGoGN::Algo::MovingObjects::ParticleBase::move(Algo::Surface::Geometry::volumeCentroid>(map,d1,position)) ; + mo->getParticule(o->indexPart1)->reset_positionFace(); #ifdef DEBUG_affichage - CGoGNout<<"part1 moved to centroid ,d : "<< mo->parts_[o->indexPart1]->getPosition()<<" || "<parts_[o->indexPart1]->d<getParticule(o->indexPart1]->getPosition()<<" || "<parts_[o->indexPart1)->getCell()<parts_[o->indexPart1]->setState(VOLUME) ; - mo->parts_[o->indexPart1]->move(pos) ; + mo->getParticule(o->indexPart1)->setState(VOLUME) ; + mo->getParticule(o->indexPart1)->move(pos) ; #ifdef DEBUG_affichage - CGoGNout<<"part1 moved in the end (destination, arrivée,d) : "<parts_[o->indexPart1]->getPosition()<<" || "<parts_[o->indexPart1]->d<getParticule(o->indexPart1]->getPosition()<<" || "<parts_[o->indexPart1)->getCell()<parts_[o->indexPart2]->CGoGN::Algo::MovingObjects::ParticleBase::move(Algo::Surface::Geometry::volumeCentroid>(map,d2,position)) ; - mo->parts_[o->indexPart2]->reset_positionFace(); + mo->getParticule(o->indexPart2)->CGoGN::Algo::MovingObjects::ParticleBase::move(Algo::Surface::Geometry::volumeCentroid>(map,d2,position)) ; + mo->getParticule(o->indexPart2)->reset_positionFace(); #ifdef DEBUG_affichage - CGoGNout<<"part2 moved to centroid ,d : "<< mo->parts_[o->indexPart2]->getPosition()<<" || "<parts_[o->indexPart2]->d<getParticule(o->indexPart2]->getPosition()<<" || "<parts_[o->indexPart2)->getCell()<parts_[o->indexPart2]->setState(VOLUME) ; - mo->parts_[o->indexPart2]->move(pos2) ; + mo->getParticule(o->indexPart2)->setState(VOLUME) ; + mo->getParticule(o->indexPart2)->move(pos2) ; #ifdef DEBUG_affichage - CGoGNout<<"part2 moved in the end (destination, arrivée,d) : "<parts_[o->indexPart2]->getPosition()<<" || "<parts_[o->indexPart2]->d<getParticule(o->indexPart2]->getPosition()<<" || "<parts_[o->indexPart2)->getCell()<cell; Dart cell2 = mo->surfaceMap.phi1(cell); Dart cell3 = mo->surfaceMap.phi1(cell2); - Particule * p = mo->parts_[mo->indexParticule[cell]]; - Particule * p2 = mo->parts_[mo->indexParticule[cell2]]; - Particule * p3 = mo->parts_[mo->indexParticule[cell3]]; + Particule * p = mo->getParticule(mo->indexParticule[cell]); + Particule * p2 = mo->getParticule(mo->indexParticule[cell2]); + Particule * p3 = mo->getParticule(mo->indexParticule[cell3]); if (mo != NULL) { @@ -850,9 +850,9 @@ void EnvMap::resetPartSubdiv(Triangle * o) VEC3 pos = p->getPosition(); VEC3 pos2 = p2->getPosition(); VEC3 pos3 = p3->getPosition(); - Dart d1 =p->d; - Dart d2 =p2->d; - Dart d3 = p3->d; + Dart d1 =p->getCell(); + Dart d2 =p2->getCell(); + Dart d3 = p3->getCell(); #ifdef DEBUG_affichage CGoGNout<<"Reset part subdiv (index articul , segment ,ind1, pos1, d1, ind2, pos2, d2) : "<index_articulated<<" || "<index<<" || "<indexPart1<<" || "<indexPart2<<" || "<> startingPoints) CGoGNout<<" init Segment :"<< i ; CGoGNout<<" || nb_segments :"<< Segments_.size() <getPosition(), - parts_[(i + 1)]->getPosition(), + Segment* o = new Segment(getParticule(i)->getPosition(), + getParticule((i + 1))->getPosition(), this,i,i+1, i,r,g,b); Segments_.push_back(o); @@ -119,19 +119,19 @@ void Knife::unColor_close(Dart volume) void Knife::move(VEC3 diff) { // VEC3 pos = getPosition(0)+diff; -// parts_[0]->move(pos); +// getParticule(0)->move(pos); for (unsigned int i = 0; i < nbVertices; ++i) { VEC3 pos = getPosition(i)+diff; - if(sim_->envMap_.map.isVolumeIncidentToBoundary(parts_[i]->d)) + if(sim_->envMap_.map.isVolumeIncidentToBoundary(this->getParticule(i)->getCell())) { - if(sim_->envMap_.checkPointInMap(pos,parts_[i]->d)) + if(sim_->envMap_.checkPointInMap(pos,this->getParticule(i)->getCell())) { - parts_[i]->move(pos); + getParticule(i)->move(pos); } } else - parts_[i]->move(pos); + getParticule(i)->move(pos); } updateRegistration(); @@ -150,11 +150,15 @@ void Knife::updateRegistration() { // CGoGNout << "avant une etape : Segment "<< i << CGoGNendl; Segment* o = Segments_[i]; - o->p1 = parts_[o->indexPart1]->getPosition(); - o->p2 = parts_[o->indexPart2]->getPosition(); - Dart d1 = parts_[o->indexPart1]->d; - Dart d2 = parts_[o->indexPart2]->d; - if(!((sim_->envMap_.map.sameVolume(d1,d2))&& (parts_[o->indexPart1]->crossCell==CGoGN::Algo::Volume::MovingObjects::NO_CROSS && parts_[o->indexPart2]->crossCell==CGoGN::Algo::Volume::MovingObjects::NO_CROSS))) + o->p1 = getParticule(o->indexPart1)->getPosition(); + o->p2 = getParticule(o->indexPart2)->getPosition(); + Dart d1 = this->getParticule(o->indexPart1)->getCell(); + Dart d2 = this->getParticule(o->indexPart2)->getCell(); + if(!( + (sim_->envMap_.map.sameVolume(d1,d2)) + && (getParticule(o->indexPart1)->crossCell==CGoGN::Algo::Volume::MovingObjects::NO_CROSS + && getParticule(o->indexPart2)->crossCell==CGoGN::Algo::Volume::MovingObjects::NO_CROSS)) + ) { #ifdef DEBUG_affichage @@ -183,7 +187,7 @@ void Knife::updateRegistration() void Knife::refine() { -// Dart volume = parts_[0]->d; +// Dart volume = this->getParticule(0)->getCell(); // PFP::VEC3 edge = Algo::Surface::Geometry::vectorOutOfDart(sim_->envMap_.map, volume, sim_->envMap_.position) ; // if( edge.norm2() > 1.0f ) // { diff --git a/src/needle.cpp b/src/needle.cpp index a9db48d..a860c87 100644 --- a/src/needle.cpp +++ b/src/needle.cpp @@ -38,8 +38,8 @@ void Needle::color_close() { if(nbVertices>0) { - Dart volume = parts_[0]->d; - VEC3 pos=parts_[0]->getPosition(); + Dart volume = this->getParticule(0)->getCell(); + VEC3 pos=getParticule(0)->getPosition(); float distSq=0; for (Segment * s : sim_->envMap_.RegisteredEdges[volume]) { @@ -110,10 +110,10 @@ void Needle::unColor_close(Dart volume) void Needle::createEdge(int index) { - parts_.push_back(new CGoGN::Algo::Volume::MovingObjects::ParticleCell3D(sim_->envMap_.map, parts_[0]->d, parts_[0]->getPosition() , sim_->envMap_.position)); + parts_.push_back(new CGoGN::Algo::Volume::MovingObjects::ParticleCell3D(sim_->envMap_.map, this->getParticule(0)->getCell(), getParticule(0)->getPosition() , sim_->envMap_.position)); - Segment* o = new Segment(parts_[index+1]->getPosition(), - parts_[0]->getPosition(), + Segment* o = new Segment(getParticule(index+1)->getPosition(), + getParticule(0)->getPosition(), this,index+1,0,index,r,g,b); Segments_.push_back(o); sim_->envMap_.FirstRegistrationSegment(o); @@ -154,23 +154,23 @@ void Needle::createEdge(int index) void Needle::move(VEC3 diff) { // VEC3 pos = getPosition(0)+diff; -// parts_[0]->move(pos); - Dart oldCell = parts_[0]->d; +// getParticule(0)->move(pos); + Dart oldCell = this->getParticule(0)->getCell(); VEC3 pos = getPosition(0)+diff; - if(sim_->envMap_.map.isVolumeIncidentToBoundary(parts_[0]->d)) + if(sim_->envMap_.map.isVolumeIncidentToBoundary(this->getParticule(0)->getCell())) { - if(!sim_->envMap_.checkPointInMap(pos,parts_[0]->d)) + if(!sim_->envMap_.checkPointInMap(pos,this->getParticule(0)->getCell())) { pos=pos-diff; } } - parts_[0]->move(pos); + this->getParticule(0)->move(pos); updateRegistration(); this->unColor_close(oldCell); #ifdef IHMap - if(!parts_[0]->crossCell==CGoGN::Algo::Volume::MovingObjects::NO_CROSS) /// a rajouter si les cellules sont assez petites + if(!getParticule(0)->crossCell==CGoGN::Algo::Volume::MovingObjects::NO_CROSS) /// a rajouter si les cellules sont assez petites { refine(); } @@ -200,11 +200,13 @@ void Needle::move(VEC3 diff) void Needle::updateRegistration() { Segment* o = Segments_[nbEdges-1]; - o->p1 = parts_[o->indexPart1]->getPosition(); - o->p2 = parts_[o->indexPart2]->getPosition(); - Dart d1 = parts_[o->indexPart1]->d; - Dart d2 = parts_[o->indexPart2]->d; - if(!((sim_->envMap_.map.sameVolume(d1,d2))&& (parts_[o->indexPart1]->crossCell==CGoGN::Algo::Volume::MovingObjects::NO_CROSS && parts_[o->indexPart2]->crossCell==CGoGN::Algo::Volume::MovingObjects::NO_CROSS))) + o->p1 = getParticule(o->indexPart1)->getPosition(); + o->p2 = getParticule(o->indexPart2)->getPosition(); + Dart d1 = this->getParticule(o->indexPart1)->getCell(); + Dart d2 = this->getParticule(o->indexPart2)->getCell(); + if(!( + (sim_->envMap_.map.sameVolume(d1,d2)) + && (getParticule(o->indexPart1)->crossCell==CGoGN::Algo::Volume::MovingObjects::NO_CROSS && getParticule(o->indexPart2)->crossCell==CGoGN::Algo::Volume::MovingObjects::NO_CROSS))) { #ifdef DEBUG_affichage CGoGNout<<"update registration "<d; + Dart volume = this->getParticule(0)->getCell(); REAL rayon = sim_->envMap_.volumeMaxdistance(volume) ; if(rayon > sim_->envMap_.maxCellRay ) diff --git a/src/tree.cpp b/src/tree.cpp index e6ae221..addd6a8 100644 --- a/src/tree.cpp +++ b/src/tree.cpp @@ -33,8 +33,8 @@ Tree::Tree(Simulator* sim, std::vector> startingPoints, st std::pair pair = segmentParts.at(i); unsigned int ind1=pair.first; unsigned int ind2=pair.second; - Segment* o = new Segment(parts_[ind1]->getPosition(), - parts_[ind2]->getPosition(), + Segment* o = new Segment(getParticule(ind1)->getPosition(), + getParticule(ind2)->getPosition(), this,ind1,ind2, i,r,g,b); Segments_.push_back(o); diff --git a/src/viewer.cpp b/src/viewer.cpp index d5173a5..b3eb7c8 100644 --- a/src/viewer.cpp +++ b/src/viewer.cpp @@ -292,7 +292,7 @@ void Volusion::cb_initGL() for (unsigned int i=0; i< simul.aiguille->nbVertices; ++i) { - VEC3 p = simul.aiguille->parts_[i]->getPosition(); + VEC3 p = simul.aiguille->getParticule(i)->getPosition(); data[i] = p; } // data[simul.aiguille->nbVertices]=simul.aiguille->closest_point; @@ -332,8 +332,8 @@ void Volusion::displayMO() m_ds->end(); m_ds->endList(); -// VEC3 pos1 = simul.aiguille->parts_[0]->getPosition(); -// VEC3 pos2 = simul.aiguille->parts_[1]->getPosition(); +// VEC3 pos1 = simul.aiguille->getParticule(0)->getPosition(); +// VEC3 pos2 = simul.aiguille->getParticule(1)->getPosition(); // float f; // VEC3 cylinder_axis =cylinder->getAxisScale(2,f); PFP::VEC3* data = static_cast(m_MovingObjectVBO->lockPtr()); @@ -388,7 +388,7 @@ void Volusion::displayMO() for(const auto& vect : simul.aiguille->belonging_cells) { -// m_topo_render->overdrawDart(simul.aiguille->parts_[i]->d,10.0f,1.0f,0,0); +// m_topo_render->overdrawDart(simul.aiguille->getParticule(i)->getCell(),10.0f,1.0f,0,0); for(Dart it : vect) { for (Edge d : edgesIncidentToVolume3(simul.envMap_.map,it)) @@ -400,13 +400,13 @@ void Volusion::displayMO() } } -// m_topo_render->overdrawDart(simul.aiguille->parts_[simul.aiguille->nbEdges]->d,10.0f,1.0f,0,0); +// m_topo_render->overdrawDart(simul.aiguille->getParticule(simul.aiguille->nbEdges)->getCell(),10.0f,1.0f,0,0); } else { -// m_topo_render->overdrawDart(simul.aiguille->parts_[val_comboEdge-1]->d,10.0f,1.0f,0,0); -// m_topo_render->overdrawDart(simul.aiguille->parts_[val_comboEdge]->d,10.0f,1.0f,0,0); +// m_topo_render->overdrawDart(simul.aiguille->getParticule(val_comboEdge-1)->getCell(),10.0f,1.0f,0,0); +// m_topo_render->overdrawDart(simul.aiguille->getParticule(val_comboEdge)->getCell(),10.0f,1.0f,0,0); int i = val_comboEdge-1; for(Dart it : simul.aiguille->belonging_cells[i]) { @@ -430,7 +430,7 @@ void Volusion::displayMO() { for(const auto& vect : simul.aiguille->neighbor_cells) { -// m_topo_render->overdrawDart(simul.aiguille->parts_[i]->d,10.0f,1.0f,0,0); +// m_topo_render->overdrawDart(simul.aiguille->getParticule(i)->getCell(),10.0f,1.0f,0,0); for(Dart it : vect) { for (Edge d : edgesIncidentToVolume3(simul.envMap_.map,(it))) @@ -512,8 +512,8 @@ void Volusion::displayObj() m_ds->end(); m_ds->endList(); -// VEC3 pos1 = art->parts_[0]->getPosition(); -// VEC3 pos2 = art->parts_[1]->getPosition(); +// VEC3 pos1 = art->getParticule(0)->getPosition(); +// VEC3 pos2 = art->getParticule(1)->getPosition(); // float f; // VEC3 cylinder_axis =cylinder->getAxisScale(2,f); PFP::VEC3* data = static_cast(m_MovingObjectVBO->lockPtr()); @@ -555,7 +555,7 @@ void Volusion::displayObj() for(const auto& vect : o->belonging_cells) { // CGoGNout<<" size vector :"<< vect.size() << CGoGNendl; - // m_topo_render->overdrawDart(simul.aiguille->parts_[i]->d,10.0f,1.0f,0,0); + // m_topo_render->overdrawDart(simul.aiguille->getParticule(i)->getCell(),10.0f,1.0f,0,0); for(Dart it : vect) { for (Edge d : edgesIncidentToVolume3(simul.envMap_.map,(it))) @@ -574,7 +574,7 @@ void Volusion::displayObj() unsigned int i=0; // for(unsigned int i =0;inbTriangles;i++) { - // m_topo_render->overdrawDart(simul.aiguille->parts_[i]->d,10.0f,1.0f,0,0); + // m_topo_render->overdrawDart(simul.aiguille->getParticule(i)->getCell(),10.0f,1.0f,0,0); for(Dart it : o->belonging_cells[i]) { for (Edge d : edgesIncidentToVolume3(simul.envMap_.map,(it))) @@ -594,7 +594,7 @@ void Volusion::displayObj() { for(const auto& vect : o->neighbor_cells) { - // m_topo_render->overdrawDart(simul.aiguille->parts_[i]->d,10.0f,1.0f,0,0); + // m_topo_render->overdrawDart(simul.aiguille->getParticule(i)->getCell(),10.0f,1.0f,0,0); for(Dart it : vect) { for (Edge d : edgesIncidentToVolume3(simul.envMap_.map,(it))) @@ -614,7 +614,7 @@ void Volusion::displayObj() // for(unsigned int i =0;inbTriangles;i++) { - // m_topo_render->overdrawDart(simul.aiguille->parts_[i]->d,10.0f,1.0f,0,0); + // m_topo_render->overdrawDart(simul.aiguille->getParticule(i)->getCell(),10.0f,1.0f,0,0); for(Dart it : o->neighbor_cells[i]) { for (Edge d : edgesIncidentToVolume3(simul.envMap_.map,(it))) -- GitLab