Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Thomas Pitiot
SocialAgents3D
Commits
a3f5796b
Commit
a3f5796b
authored
Nov 16, 2012
by
pitiot
Browse files
meilleures proportions
parent
4dbff019
Changes
3
Hide whitespace changes
Inline
Side-by-side
include/env_render.h
View file @
a3f5796b
...
...
@@ -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
.
0
f
,
0
.
0
f
,
1
.
0
f
)
;
glBegin
(
GL_LINE_LOOP
)
;
for
(
unsigned
int
i
=
0
;
i
<
5
;
++
i
)
...
...
src/agent.cpp
View file @
a3f5796b
...
...
@@ -8,7 +8,7 @@ float Agent::neighborDistSq_ = neighborDist_ * neighborDist_ ;
float
Agent
::
radius_
=
1.5
f
;
float
Agent
::
timeHorizon_
=
10.0
f
;
float
Agent
::
timeHorizonObst_
=
10.0
f
;
float
Agent
::
range_
=
timeHorizonObst_
*
maxSpeed_
+
radius_
;
float
Agent
::
range_
=
(
timeHorizonObst_
*
maxSpeed_
+
radius_
)
;
float
Agent
::
rangeSq_
=
range_
*
range_
;
unsigned
int
Agent
::
cptAgent
=
0
;
...
...
src/simulator.cpp
View file @
a3f5796b
...
...
@@ -13,7 +13,7 @@ Simulator::Simulator(int minSize) :
avoidance
(
1
),
nb_dead
(
0
)
{
multires
=
fals
e
;
multires
=
tru
e
;
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.0
f
,
960.0
f
,
minSize
,
320.0
f
)
;
//grosses cases
}
else
{
envMap_
.
init
(
config
,
1600.0
f
,
960.0
f
,
minSize
,
20.0
f
)
;
//cases fines
}
switch
(
config
)
{
case
0
:
setupCircleScenario
(
100
)
;
break
;
case
1
:
setupCorridorScenario
(
1000
,
10
0
)
;
setupCorridorScenario
(
1000
,
4
0
)
;
break
;
case
2
:
setupScenario
(
1000
)
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment