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

bla

parent 869ef92b
......@@ -59,6 +59,9 @@ public:
static float timeHorizonObst_;
static float rangeSq_;
static unsigned int cptAgent;
unsigned int agentNo ;
VEC3 velocity_;
VEC3 newVelocity_;
VEC3 prefVelocity_;
......
......@@ -9,6 +9,8 @@ float Agent::timeHorizon_ = 10.0f;
float Agent::timeHorizonObst_ = 10.0f;
float Agent::rangeSq_ = (timeHorizonObst_ * maxSpeed_ + radius_) * (timeHorizonObst_ * maxSpeed_ + radius_);
unsigned int Agent::cptAgent = 0 ;
Agent::Agent(Simulator* sim, const VEC3& position, Dart d) :
part_(sim->envMap_.map, d, position, sim->envMap_.position),
curGoal_(-1),
......@@ -16,7 +18,9 @@ Agent::Agent(Simulator* sim, const VEC3& position, Dart d) :
newVelocity_(0),
prefVelocity_(0),
sim_(sim)
{}
{
agentNo = cptAgent++ ;
}
VEC3 Agent::getPosition()
{
......
......@@ -85,14 +85,14 @@ void SocialAgents::cb_redraw()
glColor3f(0.5f,0.5f,0.5f);
glBegin(GL_LINES);
glVertex3f(0.,0.,0.);
glVertex3f(1.,0.,0.);
glVertex3f(0.0f, 0.0f, 0.0f);
glVertex3f(1.0f, 0.0f, 0.0f);
glVertex3f(0.,0.,0.);
glVertex3f(0.,1.,0.);
glVertex3f(0.0f, 0.0f, 0.0f);
glVertex3f(0.0f, 1.0f, 0.0f);
glVertex3f(0.,0.,0.);
glVertex3f(0.,0.,1.);
glVertex3f(0.0f, 0.0f, 0.0f);
glVertex3f(0.0f, 0.0f, 1.0f);
glEnd();
if(drawAgents)
......
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