Commit d4283bc0 authored by Pierre Kraemer's avatar Pierre Kraemer
Browse files

SocialAgents -> simplif faces

parent 4cbe43d5
...@@ -338,7 +338,7 @@ void EnvMap::addNeighborAgents(PFP::AGENTS agentsFrom,PFP::AGENTS agentsTo) ...@@ -338,7 +338,7 @@ void EnvMap::addNeighborAgents(PFP::AGENTS agentsFrom,PFP::AGENTS agentsTo)
void EnvMap::updateMap() void EnvMap::updateMap()
{ {
simplifyFaces() ; // simplifyFaces() ;
subdivideFaces() ; subdivideFaces() ;
map.setCurrentLevel(map.getMaxLevel()) ; map.setCurrentLevel(map.getMaxLevel()) ;
} }
...@@ -432,14 +432,18 @@ void EnvMap::simplifyFaces() ...@@ -432,14 +432,18 @@ void EnvMap::simplifyFaces()
{ {
Dart old = map.faceOldestDart(d) ; Dart old = map.faceOldestDart(d) ;
map.setCurrentLevel(cur - 1) ; map.setCurrentLevel(cur - 1) ;
Dart fit = old ; if(map.faceIsSubdividedOnce(old))
do
{ {
map.setCurrentLevel(cur) ; unsigned int nbAgents = 0 ;
Dart fit = old ;
map.setCurrentLevel(cur - 1) ; do
fit = phi1(fit) ; {
} while(fit != d) ; map.setCurrentLevel(cur) ;
nbAgents += agentvect[fit].size() ;
map.setCurrentLevel(cur - 1) ;
fit = map.phi1(fit) ;
} while(fit != old) ;
}
map.setCurrentLevel(cur) ; map.setCurrentLevel(cur) ;
} }
} }
......
Supports Markdown
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