Commit a3f5796b authored by pitiot's avatar pitiot
Browse files

meilleures proportions

parent 4dbff019
......@@ -121,7 +121,7 @@ inline void renderAgent(EnvMap& m, Agent* agent, bool showNeighborDist = false,
if (showObstacleDist)
{
radius = (agent->timeHorizonObst_ * agent->maxSpeed_) + agent->radius_ ;
radius = (agent->range_);
glColor3f(0.0f, 0.0f, 1.0f) ;
glBegin(GL_LINE_LOOP) ;
for (unsigned int i = 0 ; i < 5 ; ++i)
......
......@@ -8,7 +8,7 @@ float Agent::neighborDistSq_ = neighborDist_ * neighborDist_ ;
float Agent::radius_ = 1.5f ;
float Agent::timeHorizon_ = 10.0f ;
float Agent::timeHorizonObst_ = 10.0f ;
float Agent::range_ = timeHorizonObst_ * maxSpeed_ + radius_ ;
float Agent::range_ = (timeHorizonObst_ * maxSpeed_ + radius_) ;
float Agent::rangeSq_ = range_ * range_ ;
unsigned int Agent::cptAgent = 0 ;
......
......@@ -13,7 +13,7 @@ Simulator::Simulator(int minSize) :
avoidance(1),
nb_dead(0)
{
multires=false;
multires=true;
detect_agent_collision=true;
srand(10) ;
nbStepsPerUnit_ = 1 / timeStep_ ;
......@@ -29,15 +29,21 @@ Simulator::~Simulator()
void Simulator::init(unsigned int config, int minSize, float dimension, bool enablePathFinding)
{
std::cout << "Setup scenario" << std::endl ;
// envMap_.init(config, 1600.0f, 960.0f, minSize, 320.0f) ; //grosses cases
if (multires)
{
envMap_.init(config, 1600.0f, 960.0f, minSize, 320.0f) ; //grosses cases
}
else
{
envMap_.init(config, 1600.0f, 960.0f, minSize, 20.0f) ; //cases fines
}
switch (config)
{
case 0 :
setupCircleScenario(100) ;
break ;
case 1 :
setupCorridorScenario(1000,100) ;
setupCorridorScenario(1000,40) ;
break ;
case 2 :
setupScenario(1000) ;
......
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