Commit 9d618d97 authored by Etienne Schmitt's avatar Etienne Schmitt

Merge branch 'develop' of icube-forge.unistra.fr:pitiot/volusion into develop

# Conflicts:
#	include/env_map.h
#	src/env_map.cpp
Signed-off-by: Etienne Schmitt's avatarÉtienne Schmitt <etienne.schmitt@inria.fr>
parents e3b6c3f3 a2215104
...@@ -181,7 +181,7 @@ inline void EnvMap::FindNeighborCells (const std::vector<Dart>& belonging_cells, ...@@ -181,7 +181,7 @@ inline void EnvMap::FindNeighborCells (const std::vector<Dart>& belonging_cells,
if (!map.isBoundaryMarked<3>(d) && !memo_mark.isMarked(d) && !OneRingMark.isMarked(d) ) if (!map.isBoundaryMarked<3>(d) && !memo_mark.isMarked(d) && !OneRingMark.isMarked(d) )
{ {
OneRingMark.mark(d); OneRingMark.mark(d);
(*neighbor_cells).push_back(d); (*neighbor_cells).push_back(map.volumeOldestDart(d));
} }
} }
......
...@@ -39,7 +39,8 @@ void ArticulatedObject::addGeneralCell ( Dart d) ...@@ -39,7 +39,8 @@ void ArticulatedObject::addGeneralCell ( Dart d)
bool added = false; bool added = false;
for(std::pair<Dart,int>& pere : general_belonging) for(std::pair<Dart,int>& pere : general_belonging)
{ {
if(sim_->envMap_.map.sameVolume(pere.first,d)) // if(sim_->envMap_.map.sameVolume(pere.first,d))
if(pere.first==d)
{ {
pere.second ++; pere.second ++;
added= true; added= true;
...@@ -59,7 +60,8 @@ bool ArticulatedObject::removeGeneralCell (Dart d) ...@@ -59,7 +60,8 @@ bool ArticulatedObject::removeGeneralCell (Dart d)
{ {
for(std::pair<Dart,int>& pere : general_belonging) for(std::pair<Dart,int>& pere : general_belonging)
{ {
if(sim_->envMap_.map.sameVolume(pere.first,d)) // if(sim_->envMap_.map.sameVolume(pere.first,d))
if(pere.first==d)
{ {
pere.second--; pere.second--;
if(pere.second==0) if(pere.second==0)
...@@ -80,7 +82,8 @@ void ArticulatedObject::addGeneralNeighbor ( Dart d) ...@@ -80,7 +82,8 @@ void ArticulatedObject::addGeneralNeighbor ( Dart d)
bool added = false; bool added = false;
for(std::pair<Dart,int>& pere : general_neighbors) for(std::pair<Dart,int>& pere : general_neighbors)
{ {
if(sim_->envMap_.map.sameVolume(pere.first,d)) // if(sim_->envMap_.map.sameVolume(pere.first,d))
if(pere.first==d)
{ {
pere.second ++; pere.second ++;
added= true; added= true;
...@@ -100,7 +103,8 @@ bool ArticulatedObject::removeGeneralNeighbor (Dart d) ...@@ -100,7 +103,8 @@ bool ArticulatedObject::removeGeneralNeighbor (Dart d)
{ {
for(std::pair<Dart,int>& pere : general_neighbors) for(std::pair<Dart,int>& pere : general_neighbors)
{ {
if(sim_->envMap_.map.sameVolume(pere.first,d)) // if(sim_->envMap_.map.sameVolume(pere.first,d))
if(pere.first==d)
{ {
pere.second--; pere.second--;
if(pere.second==0) if(pere.second==0)
......
This diff is collapsed.
...@@ -287,7 +287,8 @@ void Surface::addGeneralCell ( Dart d) ...@@ -287,7 +287,8 @@ void Surface::addGeneralCell ( Dart d)
bool added = false; bool added = false;
for(std::pair<Dart,int>& pere : general_belonging) for(std::pair<Dart,int>& pere : general_belonging)
{ {
if(sim_->envMap_.map.sameVolume(pere.first,d)) // if(sim_->envMap_.map.sameVolume(pere.first,d))
if(pere.first==d)
{ {
pere.second ++; pere.second ++;
added= true; added= true;
...@@ -307,7 +308,8 @@ bool Surface::removeGeneralCell (Dart d) ...@@ -307,7 +308,8 @@ bool Surface::removeGeneralCell (Dart d)
{ {
for(std::pair<Dart,int>& pere : general_belonging) for(std::pair<Dart,int>& pere : general_belonging)
{ {
if(sim_->envMap_.map.sameVolume(pere.first,d)) // if(sim_->envMap_.map.sameVolume(pere.first,d))
if(pere.first==d)
{ {
pere.second--; pere.second--;
if(pere.second==0) if(pere.second==0)
...@@ -328,7 +330,8 @@ void Surface::addGeneralNeighbor ( Dart d) ...@@ -328,7 +330,8 @@ void Surface::addGeneralNeighbor ( Dart d)
bool added = false; bool added = false;
for(std::pair<Dart,int>& pere : general_neighbors) for(std::pair<Dart,int>& pere : general_neighbors)
{ {
if(sim_->envMap_.map.sameVolume(pere.first,d)) // if(sim_->envMap_.map.sameVolume(pere.first,d))
if(pere.first==d)
{ {
pere.second ++; pere.second ++;
added= true; added= true;
...@@ -348,7 +351,8 @@ bool Surface::removeGeneralNeighbor (Dart d) ...@@ -348,7 +351,8 @@ bool Surface::removeGeneralNeighbor (Dart d)
{ {
for(std::pair<Dart,int>& pere : general_neighbors) for(std::pair<Dart,int>& pere : general_neighbors)
{ {
if(sim_->envMap_.map.sameVolume(pere.first,d)) // if(sim_->envMap_.map.sameVolume(pere.first,d))
if(pere.first==d)
{ {
pere.second--; pere.second--;
if(pere.second==0) if(pere.second==0)
......
...@@ -569,7 +569,8 @@ void Volusion::displayObj() ...@@ -569,7 +569,8 @@ void Volusion::displayObj()
m_topo_render->updateData(simul.envMap_.map, simul.envMap_.position, 0.8f, 0.8f, 0.8f); m_topo_render->updateData(simul.envMap_.map, simul.envMap_.position, 0.8f, 0.8f, 0.8f);
for (Surface * o : simul.surfaces) for (Surface * o : simul.surfaces)
{ {
for(unsigned int i =0;i<o->nbTriangles;i++) unsigned int i=0;
// for(unsigned int i =0;i<o->nbTriangles;i++)
{ {
// m_topo_render->overdrawDart(simul.aiguille->parts_[i]->d,10.0f,1.0f,0,0); // m_topo_render->overdrawDart(simul.aiguille->parts_[i]->d,10.0f,1.0f,0,0);
for(auto it = o->belonging_cells[i].begin(); it !=o->belonging_cells[i].end();++it) for(auto it = o->belonging_cells[i].begin(); it !=o->belonging_cells[i].end();++it)
...@@ -607,8 +608,10 @@ void Volusion::displayObj() ...@@ -607,8 +608,10 @@ void Volusion::displayObj()
m_topo_render->updateData(simul.envMap_.map, simul.envMap_.position, 0.8f, 0.8f, 0.8f); m_topo_render->updateData(simul.envMap_.map, simul.envMap_.position, 0.8f, 0.8f, 0.8f);
for (Surface * o : simul.surfaces) for (Surface * o : simul.surfaces)
{ {
for(unsigned int i =0;i<o->nbTriangles;i++) unsigned int i=0;
// for(unsigned int i =0;i<o->nbTriangles;i++)
{ {
// m_topo_render->overdrawDart(simul.aiguille->parts_[i]->d,10.0f,1.0f,0,0); // m_topo_render->overdrawDart(simul.aiguille->parts_[i]->d,10.0f,1.0f,0,0);
for(auto it = o->neighbor_cells[i].begin(); it !=o->neighbor_cells[i].end();++it) for(auto it = o->neighbor_cells[i].begin(); it !=o->neighbor_cells[i].end();++it)
{ {
......
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