Création d'un compte pour un collaborateur extérieur au laboratoire depuis l'intranet ICube : https://intranet.icube.unistra.fr/fr/labs/member/profile

Commit 38eb3098 authored by pitiot's avatar pitiot
Browse files

merging

parent 3797df7a
...@@ -25,6 +25,7 @@ add_executable( socialAgentsD ...@@ -25,6 +25,7 @@ add_executable( socialAgentsD
../src/env_map.cpp ../src/env_map.cpp
../src/agent.cpp ../src/agent.cpp
../src/moving_obstacle.cpp ../src/moving_obstacle.cpp
../src/articulated_obstacle.cpp
../src/simulator.cpp ../src/simulator.cpp
../src/moving_mesh.cpp ../src/moving_mesh.cpp
../src/gl2ps.c ../src/gl2ps.c
......
...@@ -23,6 +23,7 @@ add_executable( socialAgents ...@@ -23,6 +23,7 @@ add_executable( socialAgents
../src/env_map.cpp ../src/env_map.cpp
../src/agent.cpp ../src/agent.cpp
../src/moving_obstacle.cpp ../src/moving_obstacle.cpp
../src/articulated_obstacle.cpp
../src/simulator.cpp ../src/simulator.cpp
../src/moving_mesh.cpp ../src/moving_mesh.cpp
../src/gl2ps.c ../src/gl2ps.c
......
...@@ -55,7 +55,12 @@ public: ...@@ -55,7 +55,12 @@ public:
VEC3 finalGoal ; VEC3 finalGoal ;
Dart finalDart ; Dart finalDart ;
MovingObstacle **movingObstacles_;
int nb_mos;
static unsigned int maxNeighbors_ ; static unsigned int maxNeighbors_ ;
static unsigned int maxMovingObstacles_;
static float averageMaxSpeed_ ; static float averageMaxSpeed_ ;
static float neighborDist_ ; static float neighborDist_ ;
static float neighborDistSq_ ; static float neighborDistSq_ ;
......
...@@ -15,7 +15,7 @@ bool notDiagonalAdjacentToAnObstacle(typename PFP::MAP& map, Dart d, CellMarker< ...@@ -15,7 +15,7 @@ bool notDiagonalAdjacentToAnObstacle(typename PFP::MAP& map, Dart d, CellMarker<
template <typename PFP> Algo::Modelisation::Polyhedron<PFP> generateGrid(EnvMap& envMap) ; template <typename PFP> Algo::Modelisation::Polyhedron<PFP> generateGrid(EnvMap& envMap) ;
template <typename PFP> void generateCity(EnvMap& envMap) ; template <typename PFP> void generateCity(EnvMap& envMap, unsigned int nbBuildings) ;
template <typename PFP> template <typename PFP>
Algo::Modelisation::Polyhedron<PFP> generateTrianGrid(typename PFP::MAP& map, Algo::Modelisation::Polyhedron<PFP> generateTrianGrid(typename PFP::MAP& map,
......
...@@ -63,9 +63,9 @@ Algo::Modelisation::Polyhedron<PFP> generateGrid(EnvMap& envMap) ...@@ -63,9 +63,9 @@ Algo::Modelisation::Polyhedron<PFP> generateGrid(EnvMap& envMap)
} }
template <typename PFP> template <typename PFP>
void generateCity(EnvMap& envMap) void generateCity(EnvMap& envMap, unsigned int nbBuildings)
{ {
unsigned int nbBuilding = 1000 ; unsigned int nbBuilding = nbBuildings ;
std::cout << " - Generate City : " << nbBuilding << " buildings" << std::endl ; std::cout << " - Generate City : " << nbBuilding << " buildings" << std::endl ;
generateGrid<PFP>(envMap) ; generateGrid<PFP>(envMap) ;
...@@ -76,7 +76,7 @@ void generateCity(EnvMap& envMap) ...@@ -76,7 +76,7 @@ void generateCity(EnvMap& envMap)
if (!envMap.buildingMark.isMarked(d) && (rand() % 12 == 0) if (!envMap.buildingMark.isMarked(d) && (rand() % 12 == 0)
&& notDiagonalAdjacentToAnObstacle<PFP>(envMap.map, d, envMap.buildingMark)) && notDiagonalAdjacentToAnObstacle<PFP>(envMap.map, d, envMap.buildingMark))
{ {
generateBuilding<PFP>(envMap, d, (1 + (rand() % 3)) * 2.0f, rand() % 4) ; generateBuilding<PFP>(envMap, d, (1 + (rand() % 3)) * 50.0f, rand() % 4) ;
--nbBuilding ; --nbBuilding ;
} }
} }
......
...@@ -28,6 +28,7 @@ using namespace CGoGN ; ...@@ -28,6 +28,7 @@ using namespace CGoGN ;
class Agent; class Agent;
class Obstacle; class Obstacle;
class MovingObstacle; class MovingObstacle;
class ArticulatedObstacle;
#include "pfp.h" #include "pfp.h"
...@@ -402,6 +403,7 @@ inline void EnvMap::find_next(Obstacle* o,Dart * ddd, CellMarkerMemo<FACE>& cms) ...@@ -402,6 +403,7 @@ inline void EnvMap::find_next(Obstacle* o,Dart * ddd, CellMarkerMemo<FACE>& cms)
inline void EnvMap::pushObstNeighborInCells(Obstacle* o, Dart d) inline void EnvMap::pushObstNeighborInCells(Obstacle* o, Dart d)
{ {
assert(map.getCurrentLevel() == map.getMaxLevel()); assert(map.getCurrentLevel() == map.getMaxLevel());
assert(std::find(neighborObstvect[d].begin(), neighborObstvect[d].end(), o) == neighborObstvect[d].end());
addElementToVector<Obstacle*>(neighborObstvect[d],o); addElementToVector<Obstacle*>(neighborObstvect[d],o);
} }
......
...@@ -10,13 +10,13 @@ ...@@ -10,13 +10,13 @@
using namespace std; using namespace std;
PFP::VEC3 rotate (PFP::VEC3 pos1, PFP::VEC3 center, float angle); PFP::VEC3 rotate (PFP::VEC3 pos1, PFP::VEC3 center, float angle);
float get_angle (PFP::VEC3 v1, PFP::VEC3 v2); float get_angle (PFP::VEC3 v1, PFP::VEC3 v2);
PFP::VEC3 get_center (ArticulatedObstacle * art, int index);
class Simulator ; class Simulator ;
class MovingObstacle class MovingObstacle
{ {
public: public:
MovingObstacle(Simulator* sim, int index, std::vector<PFP::VEC3> pos, std::vector<VEC3> goals,bool spin); MovingObstacle(Simulator* sim, int index, std::vector<PFP::VEC3> pos, std::vector<VEC3> goals,bool spin, ArticulatedObstacle * art=NULL, int ind2=-1);
bool test_opposition(VEC3 o, VEC3 p1, VEC3 p2); bool test_opposition(VEC3 o, VEC3 p1, VEC3 p2);
// void contournerBatiment(); // void contournerBatiment();
void updateAgentNeighbors() ; void updateAgentNeighbors() ;
...@@ -44,6 +44,8 @@ public: ...@@ -44,6 +44,8 @@ public:
std::vector<Dart> * neighbor_cells; std::vector<Dart> * neighbor_cells;
std::set<Dart> general_belonging; std::set<Dart> general_belonging;
VEC3 front; VEC3 front;
VEC3 focus1, focus2;
double length, width, sum_dist_foci, sum_dist_foci_rest;
VEC3 finalGoal; VEC3 finalGoal;
float angle; float angle;
...@@ -61,11 +63,17 @@ public: ...@@ -61,11 +63,17 @@ public:
float obstacle_range; float obstacle_range;
static float timeHorizonObst_; static float timeHorizonObst_;
float velocity_factor; float velocity_factor;
float color1;
float color2;
float color3;
bool seen;
VEC3 velocity_; VEC3 velocity_;
VEC3 newVelocity_; VEC3 newVelocity_;
VEC3 prefVelocity_; VEC3 prefVelocity_;
Simulator* sim_; Simulator* sim_;
bool spinning; bool spinning;
ArticulatedObstacle * parent;
int index_parent;
}; };
#endif #endif
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
#include "env_map.h" #include "env_map.h"
#include "agent.h" #include "agent.h"
#include "obstacle.h" #include "obstacle.h"
#include "moving_obstacle.h" #include "articulated_obstacle.h"
#include "moving_mesh.h" #include "moving_mesh.h"
#include "path_finder.h" #include "path_finder.h"
...@@ -84,7 +84,7 @@ public: ...@@ -84,7 +84,7 @@ public:
~Simulator() ; ~Simulator() ;
void init(unsigned int config, float dimension, bool enablePathFinding = false) ; void init(float dimension, bool enablePathFinding = false) ;
void doStep() ; void doStep() ;
...@@ -92,7 +92,7 @@ public: ...@@ -92,7 +92,7 @@ public:
void setupCircleScenario(unsigned int nbAgents, unsigned int nbObstacles) ; void setupCircleScenario(unsigned int nbAgents, unsigned int nbObstacles) ;
void setupCorridorScenario(unsigned int nbAgents, unsigned int nbObstacles) ; void setupCorridorScenario(unsigned int nbAgents, unsigned int nbObstacles) ;
void setupCorridor2Scenario(unsigned int nbAgents, unsigned int nbObstacles) ; void setupSnakeCorridorScenario(unsigned int nbAgents, unsigned int nbSnakes, int snakeSize) ;
void setupCityScenario(int nbLines, int nbRank) ; void setupCityScenario(int nbLines, int nbRank) ;
void setupScenario(unsigned int nbMaxAgent) ; void setupScenario(unsigned int nbMaxAgent) ;
...@@ -121,6 +121,7 @@ public: ...@@ -121,6 +121,7 @@ public:
std::vector<Agent*> agents_ ; std::vector<Agent*> agents_ ;
std::vector<MovingObstacle*> movingObstacles_; std::vector<MovingObstacle*> movingObstacles_;
int minSize; int minSize;
unsigned int config;
float timeStep_ ; float timeStep_ ;
float globalTime_ ; float globalTime_ ;
unsigned int nbSteps_ ; unsigned int nbSteps_ ;
......
...@@ -129,6 +129,13 @@ ...@@ -129,6 +129,13 @@
<item> <item>
<widget class="QSpinBox" name="check_slide"/> <widget class="QSpinBox" name="check_slide"/>
</item> </item>
<item>
<widget class="QCheckBox" name="check_elipse">
<property name="text">
<string>draw elipse</string>
</property>
</widget>
</item>
<item> <item>
<spacer name="verticalSpacer"> <spacer name="verticalSpacer">
<property name="orientation"> <property name="orientation">
......
...@@ -103,6 +103,7 @@ public: ...@@ -103,6 +103,7 @@ public:
bool drawObstPredictionTri ; bool drawObstPredictionTri ;
bool drawObstPath ; bool drawObstPath ;
bool draw_dart; bool draw_dart;
bool draw_elipse;
unsigned int dartSlider; unsigned int dartSlider;
public slots: public slots:
...@@ -182,4 +183,9 @@ public slots: ...@@ -182,4 +183,9 @@ public slots:
dartSlider = i; dartSlider = i;
updateGL(); updateGL();
} }
void slot_elipse(bool b)
{
draw_elipse = b;
updateGL();
}
} ; } ;
This diff is collapsed.
...@@ -73,17 +73,18 @@ void EnvMap::init(unsigned int config, REAL width, REAL height, REAL minSize, RE ...@@ -73,17 +73,18 @@ void EnvMap::init(unsigned int config, REAL width, REAL height, REAL minSize, RE
switch (config) switch (config)
{ {
case 0 : case 0 :
CityGenerator::generateGrid<PFP>(*this) ; // CityGenerator::generateGrid<PFP>(*this) ;
CityGenerator::generateCity<PFP>(*this,1) ;
break ; break ;
case 1 : case 1 :
CityGenerator::generateGrid<PFP>(*this) ; CityGenerator::generateGrid<PFP>(*this) ;
break ; break ;
case 2 : case 2 :
CityGenerator::generateCity<PFP>(*this) ; CityGenerator::generateGrid<PFP>(*this) ;
// CityGenerator::generateMall<PFP>(map, position, obstacleMark, buildingMark, sideSize); // CityGenerator::generateMall<PFP>(map, position, obstacleMark, buildingMark, sideSize);
break ; break ;
case 3 : case 3 :
CityGenerator::generateCity<PFP>(*this) ; CityGenerator::generateCity<PFP>(*this,10) ;
break ; break ;
case 4 : case 4 :
CityGenerator::generatePlanet<PFP>(*this) ; CityGenerator::generatePlanet<PFP>(*this) ;
......
...@@ -70,11 +70,17 @@ VEC3 rotate(VEC3 pos1, VEC3 center, float angle) // renvoie le déplacement nece ...@@ -70,11 +70,17 @@ VEC3 rotate(VEC3 pos1, VEC3 center, float angle) // renvoie le déplacement nece
return pos2; return pos2;
} }
MovingObstacle::MovingObstacle(Simulator* sim, int ind, std::vector<VEC3> pos, std::vector<VEC3> goals, bool spin) : MovingObstacle::MovingObstacle(Simulator* sim, int ind, std::vector<VEC3> pos, std::vector<VEC3> goals, bool spin, ArticulatedObstacle * art, int ind2) :
index(ind), index(ind),
newVelocity_(0), newVelocity_(0),
sim_(sim) sim_(sim),
parent(art),
index_parent(ind2)
{ {
seen = false;
color1=1.0f;
color2=1.0f;
color3=1.0f;
assert(pos.size() > 2); assert(pos.size() > 2);
// movingObstNeighbors_.reserve(maxNeighbors_); // movingObstNeighbors_.reserve(maxNeighbors_);
...@@ -102,7 +108,18 @@ MovingObstacle::MovingObstacle(Simulator* sim, int ind, std::vector<VEC3> pos, s ...@@ -102,7 +108,18 @@ MovingObstacle::MovingObstacle(Simulator* sim, int ind, std::vector<VEC3> pos, s
} }
center = sum / nbVertices; center = sum / nbVertices;
front=(vertices[1] + vertices[2]) / 2; front=(vertices[1] + vertices[2]) / 2;
if (spinning) //départ face à la cible en cas d'obstacles pouvant effectuer des rotations
//-------- code ajoute par Arash pour les obstacles rectangulaires --------------
length = (vertices[0]-vertices[1]).norm();
width = (vertices[1]-vertices[2]).norm();
sum_dist_foci_rest = 2*(length + width*(sqrt(2)-0.5));
// M appartient à l'ellipse ssi MF1 + MF2 = sum_dist_foci est une constante
// où F1 et F2 sont les deux foyers.
//-------- fin du code ajoute par Arash pour les obstacles rectangulaires -------
if (spinning && parent==NULL) //départ face à la cible en cas d'obstacles pouvant effectuer des rotations
{ {
angle = get_angle(goals_[curGoal_] - center,front - center); angle = get_angle(goals_[curGoal_] - center,front - center);
for (unsigned int i = 0; i < nbVertices; ++i) for (unsigned int i = 0; i < nbVertices; ++i)
...@@ -319,6 +336,13 @@ void MovingObstacle::update() ...@@ -319,6 +336,13 @@ void MovingObstacle::update()
if(sim_->detect_agent_collision) if(sim_->detect_agent_collision)
general_belonging.clear(); general_belonging.clear();
if(!seen)
{
color1=1.0f;
color2=1.0f;
color3=1.0f;
}
seen=false;
PFP::VEC3 bary = 0; PFP::VEC3 bary = 0;
Dart d; Dart d;
...@@ -327,7 +351,15 @@ void MovingObstacle::update() ...@@ -327,7 +351,15 @@ void MovingObstacle::update()
// MAJ des particules // MAJ des particules
float abs_angle= angle > 0 ? 1 : -1; float abs_angle= angle > 0 ? 1 : -1;
float rotor = abs_angle*angle > 0.01f ? 0.01f : abs_angle*angle ; float rotor=0;
if (index_parent==0)
{
rotor = abs_angle*angle > 0.04f ? 0.04f : abs_angle*angle ;
}
else
{
rotor = abs_angle*angle ;
}
// CGoGNout << "Obstacle "<< index << CGoGNendl; // CGoGNout << "Obstacle "<< index << CGoGNendl;
// CGoGNout << "vitesse : "<< velocity_ << CGoGNendl; // CGoGNout << "vitesse : "<< velocity_ << CGoGNendl;
// on fait tourner l'obstacle // on fait tourner l'obstacle
...@@ -354,6 +386,25 @@ void MovingObstacle::update() ...@@ -354,6 +386,25 @@ void MovingObstacle::update()
center = bary / nbVertices; center = bary / nbVertices;
//-------- code ajoute par Arash pour les obstacles rectangulaires --------------
VEC3 P0_P1 = vertices[1] - vertices[0];
float velocity_coef = 10.0;
if(P0_P1 * velocity_ > 0) // P0_P1 est dans le sens de la vitesse
{
focus1 = center - P0_P1*(1-(width/length)*(sqrt(2)-0.5));
focus2 = center + P0_P1*(1-(width/length)*(sqrt(2)-0.5)) + (velocity_coef*velocity_);
}
else
{
focus1 = center - P0_P1*(1-(width/length)*(sqrt(2)-0.5)) + (velocity_coef*velocity_);
focus2 = center + P0_P1*(1-(width/length)*(sqrt(2)-0.5));
}
sum_dist_foci = sum_dist_foci_rest + velocity_coef*velocity_.norm();
//-------- fin du code ajoute par Arash pour les obstacles rectangulaires -------
// MAJ des obstacles // MAJ des obstacles
for (unsigned int i = 0; i < nbVertices; ++i) for (unsigned int i = 0; i < nbVertices; ++i)
{ {
...@@ -386,7 +437,7 @@ void MovingObstacle::update() ...@@ -386,7 +437,7 @@ void MovingObstacle::update()
std::vector<Agent*> vector =sim_->envMap_.agentvect[(*it2)]; std::vector<Agent*> vector =sim_->envMap_.agentvect[(*it2)];
for(std::vector<Agent*>::iterator it=vector.begin();it!=vector.end(); ++it) for(std::vector<Agent*>::iterator it=vector.begin();it!=vector.end(); ++it)
{ {
if (this->is_inside((*it)->getPosition())) if (this->is_inside((*it)->part_.getPosition()))
{ {
(*it)->alive=false; (*it)->alive=false;
(*it)->color1=0.0f; (*it)->color1=0.0f;
...@@ -401,6 +452,7 @@ void MovingObstacle::update() ...@@ -401,6 +452,7 @@ void MovingObstacle::update()
} }
std::vector<Dart> MovingObstacle::getMemoCross(const VEC3& pos, const VEC3& dest, Dart& d1) std::vector<Dart> MovingObstacle::getMemoCross(const VEC3& pos, const VEC3& dest, Dart& d1)
{ {
registering_part->move(pos); registering_part->move(pos);
...@@ -417,7 +469,8 @@ void resetPartSubdiv(Obstacle* o) ...@@ -417,7 +469,8 @@ void resetPartSubdiv(Obstacle* o)
if (mo != NULL) if (mo != NULL)
{ {
VEC3 pos =mo->registering_part->getPosition(); VEC3 pos =mo->registering_part->getPosition();
mo->registering_part->ParticleBase<PFP>::move(Algo::Geometry::faceCentroid<PFP>(mo->sim_->envMap_.map, mo->registering_part->d, mo->sim_->envMap_.position)) ; mo->registering_part->CGoGN::Algo::MovingObjects::ParticleBase<PFP>::move(Algo::Geometry::faceCentroid<PFP>(mo->sim_->envMap_.map, mo->registering_part->d, mo->sim_->envMap_.position)) ;
mo->registering_part->setState(FACE) ; mo->registering_part->setState(FACE) ;
mo->registering_part->move(pos) ; mo->registering_part->move(pos) ;
} }
...@@ -459,10 +512,14 @@ void displayMO(Obstacle * o) ...@@ -459,10 +512,14 @@ void displayMO(Obstacle * o)
// TODO Check position // TODO Check position
void MovingObstacle::computePrefVelocity() //calcul du vecteur optimal pour atteindre l'objectif // changer pour 2.5 ? void MovingObstacle::computePrefVelocity() //calcul du vecteur optimal pour atteindre l'objectif // changer pour 2.5 ?
{ {
VEC3 goalVector = goals_[curGoal_] - center ; VEC3 goalVector;
if (index_parent<1)
{
goalVector = goals_[curGoal_] - center ;
float goalDist2 = goalVector.norm2() ; float goalDist2 = goalVector.norm2() ;
if (goalDist2 < 2.0f) if (goalDist2 < 5.0f)
{ {
curGoal_ = (curGoal_ + 1) % goals_.size() ; curGoal_ = (curGoal_ + 1) % goals_.size() ;
goalVector = goals_[curGoal_] - center ; goalVector = goals_[curGoal_] - center ;
...@@ -474,7 +531,19 @@ void MovingObstacle::computePrefVelocity() //calcul du vecteur optimal pour atte ...@@ -474,7 +531,19 @@ void MovingObstacle::computePrefVelocity() //calcul du vecteur optimal pour atte
goalVector.normalize() ; goalVector.normalize() ;
goalVector *= maxSpeed_; goalVector *= maxSpeed_;
} }
}
else
{
goalVector = get_center(parent,index_parent-1) -center;
float goalDist2 = goalVector.norm2() ;
if (goalDist2 > maxSpeed_)
{
goalVector.normalize() ;
goalVector *= maxSpeed_;
}
}
if (spinning) angle =get_angle(goalVector,front-center); if (spinning) angle =get_angle(goalVector,front-center);
prefVelocity_ = goalVector ; prefVelocity_ = goalVector ;
} }
...@@ -490,6 +559,7 @@ void MovingObstacle::computeNewVelocity() //comportement des obstacles en tenan ...@@ -490,6 +559,7 @@ void MovingObstacle::computeNewVelocity() //comportement des obstacles en tenan
forward.normalize() ; forward.normalize() ;
forward *= objective; forward *= objective;
} }
if(index_parent==0 && angle>0.01f) forward/=10;
newVelocity_=forward; newVelocity_=forward;
} }
else else
......
...@@ -14,11 +14,12 @@ Simulator::Simulator(unsigned int config, unsigned int minS) : ...@@ -14,11 +14,12 @@ Simulator::Simulator(unsigned int config, unsigned int minS) :
nb_dead(0) nb_dead(0)
{ {
minSize=minS; minSize=minS;
multires=false; multires=true;
detect_agent_collision=false; detect_agent_collision=true;
srand(10) ; srand(10) ;
nbStepsPerUnit_ = 1 / timeStep_ ; nbStepsPerUnit_ = 1 / timeStep_ ;
init(config, minSize, 2.0f) ; this->config=config;
init(2.0f) ;
} }
Simulator::~Simulator() Simulator::~Simulator()
...@@ -27,27 +28,21 @@ Simulator::~Simulator() ...@@ -27,27 +28,21 @@ Simulator::~Simulator()
delete agents_[i] ; delete agents_[i] ;
} }
void Simulator::init(unsigned int config, float dimension, bool enablePathFinding) void Simulator::init( float dimension, bool enablePathFinding)
{ {
std::cout << "Setup scenario" << std::endl ; std::cout << "Setup scenario" << std::endl ;
switch (config) switch (config)
{ {
case 0 : case 0 :
envMap_.init(config, 2000.0f, 2000.0f, minSize, 400.0f) ; setupCircleScenario(1000,20) ;
setupCircleScenario(1000, 35) ;
break ; break ;
case 1 : case 1 :
envMap_.init(config, 1600.0f, 1200.0f, minSize, 400.0f) ; setupCorridorScenario(1000,40) ;
setupCorridorScenario(1000, 40) ;
break ; break ;
case 2 : case 2 :
envMap_.init(config, 1600.0f, 1200.0f, minSize, 400.0f) ; setupSnakeCorridorScenario(1000,5,10) ;
setupCorridor2Scenario(200, 4) ;
break ; break ;
// case 2 :
// setupScenario(1000) ;
// break ;
// case 3 : // case 3 :
// setupCityScenario(20, 20) ; // setupCityScenario(20, 20) ;
//// setupCityScenario(-1.0f * (12 * (70.0f / 2.0f) - 10), //// setupCityScenario(-1.0f * (12 * (70.0f / 2.0f) - 10),
...@@ -206,6 +201,16 @@ void Simulator::addAgent(const VEC3& start, const VEC3& goal, Dart d) ...@@ -206,6 +201,16 @@ void Simulator::addAgent(const VEC3& start, const VEC3& goal, Dart d)
void Simulator::setupCircleScenario(unsigned int nbAgents , unsigned int nbObstacles) void Simulator::setupCircleScenario(unsigned int nbAgents , unsigned int nbObstacles)
{ {
if (multires)
{
envMap_.init(config, 2000.0f, 2000.0f, minSize, 400.0f) ; //grosses cases
}