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
616b25d7
Commit
616b25d7
authored
Oct 30, 2012
by
Jund Thomas
Browse files
micro modif
parent
7904ec91
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/moving_obstacle.cpp
View file @
616b25d7
...
...
@@ -228,6 +228,7 @@ void MovingObstacle::update()
velocity_
[
1
]
=
prefVelocity_
[
1
]
*
velocity_factor
;
// MAJ des particules
make_half_turn
=
0
;
float
rotor
=
make_half_turn
>
0.01
f
*
nbVertices
?
0.01
f
:
make_half_turn
/
nbVertices
;
// CGoGNout << "début ++ update "<< CGoGNendl;
...
...
src/simulator.cpp
View file @
616b25d7
...
...
@@ -35,7 +35,7 @@ void Simulator::init(unsigned int config, int minSize, float dimension, bool ena
setupCircleScenario
(
100
)
;
break
;
case
1
:
setupCorridorScenario
(
500
,
1
0
)
;
setupCorridorScenario
(
500
,
4
0
)
;
break
;
case
2
:
setupScenario
(
1000
)
;
...
...
@@ -274,14 +274,15 @@ void Simulator::setupCorridorScenario(unsigned int nbAgents, unsigned int nbObst
yGoalDelta
=
envMap_
.
geometry
.
size
(
1
)
/
5
;
yGoalMin
=
envMap_
.
geometry
.
max
()[
1
]
-
yBorder
-
yGoalDelta
;
VEC3
xSide
(
1
5
.0
f
,
0.0
f
,
0.0
f
);
VEC3
ySide
(
0.0
f
,
1
0
.0
f
,
0.0
f
);
VEC3
xSide
(
1
0
.0
f
,
0.0
f
,
0.0
f
);
VEC3
ySide
(
0.0
f
,
1
5
.0
f
,
0.0
f
);
std
::
vector
<
VEC3
>
vPos
;
MovingObstacle
*
mo4
;
for
(
unsigned
int
i
=
0
;
i
<
nbObstacles
;
i
++
)
{
float
x
=
xStartMin
+
rand
()
%
xStartDelta
;
float
x
=
xStartMin
+
((
int
)
i
*
30
)
%
xStartDelta
;
std
::
cout
<<
"x ? "
<<
x
<<
" xStartDelta "
<<
xStartDelta
<<
std
::
endl
;
VEC3
start
(
x
,
yStartMin
+
rand
()
%
yStartDelta
,
0
)
;
VEC3
goal
(
x
,
yGoalMin
+
rand
()
%
yGoalDelta
,
0
)
;
...
...
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