Commit 65097e59 authored by Pierre Kraemer's avatar Pierre Kraemer
Browse files

presque rie

parent ada40ede
......@@ -26,7 +26,7 @@
#include "Utils/Qt/qtSimple.h"
#include "ui_socialAgents.h"
#include "Utils/Qt/qtui.h"
#include "Utils/qtui.h"
#include "simulator.h"
#include "env_render.h"
......
......@@ -248,7 +248,7 @@ Dart EnvMap::getBelongingCell(const PFP::VEC3& pos)
void EnvMap::init(unsigned int config)
{
float sideSize = 70.0f;
unsigned int nbSquares = 24;
unsigned int nbSquares = 10;
switch(config)
{
......@@ -489,6 +489,23 @@ void EnvMap::agentChangeFace(Agent* agent, Dart oldFace)
{
coarsenMark.mark(oldFace);
coarsenCandidate.push_back(map.faceOldestDart(oldFace));
// Dart oldest = map.faceOldestDart(oldFace);
//
// unsigned int fLevel = map.faceLevel(oldest) ;
// if(fLevel > 0)
// {
// unsigned int cur = map.getCurrentLevel() ;
// map.setCurrentLevel(fLevel - 1) ;
// Dart it = oldest ;
// do
// {
// coarsenMark.mark(it) ;
// it = map.phi1(it) ;
// } while(it != oldest) ;
// coarsenCandidate.push_back(oldest) ;
// map.setCurrentLevel(cur) ;
// }
}
}
......
......@@ -24,7 +24,7 @@ void Simulator::init(unsigned int config, float dimension, bool enablePathFindin
switch(config)
{
case 0 : setupCircleScenario(1000);
case 0 : setupCircleScenario(100);
break;
case 1 : importAgents("myAgents.pos");
break;
......@@ -66,7 +66,7 @@ void Simulator::init(unsigned int config, float dimension, bool enablePathFindin
// tc3 = new ThreadUpdateInfo(agents_, nbAgents / 2, nbAgents * 3 / 4);
// tc4 = new ThreadUpdateInfo(agents_, nbAgents * 3 / 4, nbAgents);
#ifndef SPATIAL_HASHING
envMap_.subdivideToProperLevel();
// envMap_.subdivideToProperLevel();
#endif
}
......@@ -156,7 +156,7 @@ void Simulator::doStep()
}
}
#else
envMap_.map.setCurrentLevel(envMap_.map.getMaxLevel());
// envMap_.map.setCurrentLevel(envMap_.map.getMaxLevel());
for (unsigned int i = 0; i < agents_.size(); ++i)
{
......@@ -177,7 +177,7 @@ void Simulator::doStep()
}
envMap_.updateMap();
// envMap_.updateMap();
#endif
globalTime_ += timeStep_;
......@@ -204,7 +204,7 @@ void Simulator::setupCircleScenario(unsigned int nbMaxAgent)
{
float pi = 3.14159265358979323846f;
float r = 800.0f;
float r = 200.0f;
for (unsigned int i = 0; i < nbMaxAgent; ++i)
{
VEC3 posagent(std::cos(i * 2.0f * pi / float(nbMaxAgent)) * r, std::sin(i * 2.0f * pi / float(nbMaxAgent)) * r, 0);
......
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