Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Thomas Pitiot
SocialAgents3D
Commits
56ab7f86
Commit
56ab7f86
authored
May 29, 2013
by
Arash HABIBI
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
debut_scenario5
parent
23ffe43f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
18 deletions
+27
-18
src/env_map.cpp
src/env_map.cpp
+4
-3
src/simulator.cpp
src/simulator.cpp
+17
-11
src/viewer.cpp
src/viewer.cpp
+6
-4
No files found.
src/env_map.cpp
View file @
56ab7f86
...
...
@@ -234,7 +234,8 @@ void EnvMap::initGL()
std
::
vector
<
std
::
string
>
filenames
;
std
::
vector
<
std
::
string
>
texturenames
;
std
::
string
dir
(
"./meshRessources/scenario3/"
);
// std::string dir("./meshRessources/scenario3/");
std
::
string
dir
(
"./meshRessources/cityTex/"
);
DIR
*
dp
;
struct
dirent
*
dirp
;
if
((
dp
=
opendir
(
dir
.
c_str
()))
==
NULL
)
...
...
@@ -290,8 +291,8 @@ void EnvMap::initGL()
for
(
Dart
d
=
tV
.
begin
()
;
d
!=
tV
.
end
()
;
d
=
tV
.
next
())
{
// pour scenario5
//
position_Export[d] *= 100.0f;
//
position_Export[d] += VEC3(2000,0,0);
position_Export
[
d
]
*=
100.0
f
;
position_Export
[
d
]
+=
VEC3
(
2000
,
0
,
0
);
}
...
...
src/simulator.cpp
View file @
56ab7f86
...
...
@@ -667,17 +667,23 @@ void Simulator::setupScenario(unsigned int nbMaxAgent, bool pedWay)
Dart
d
=
tF
.
begin
()
;
//-----------------------
#define SCENARIO3
#if defined SCENARIO3
unsigned
int
nbx
=
5
;
unsigned
int
nby
=
5
;
#elif defined SCENARIO5
unsigned
int
nbx
=
2
;
unsigned
int
nby
=
2
;
#else
unsigned
int
nbx
=
1
;
unsigned
int
nby
=
1
;
#endif
unsigned
int
nbx
,
nby
;
if
(
config
==
3
)
{
nbx
=
5
;
nby
=
5
;
}
else
if
(
config
==
5
)
{
nbx
=
2
;
nby
=
2
;
}
else
{
nbx
=
1
;
nby
=
1
;
}
//-----------------------
...
...
src/viewer.cpp
View file @
56ab7f86
...
...
@@ -404,7 +404,7 @@ void SocialAgents::initRendering()
m_shaderTexAgent
->
setAttributeTexCoord
(
m_texcoordVBOAgent
);
m_shaderTexAgent
->
setTextureUnit
(
GL_TEXTURE0
);
m_shaderTexAgent
->
setTexture
(
m_textureAgent
);
m_shaderTexAgent
->
setAttributeNormal
(
m_normalVBOAgent
);
m_shaderTexAgent
->
setShininess
(
0.1
f
);
m_shaderTexAgent
->
setAmbient
(
0.5
f
);
...
...
@@ -1194,7 +1194,7 @@ void SocialAgents::animate()
// QString filename("./export/meshCercleBA" );
// QString filename("./export/meshCorridorBA" );
// QString filename("./export/oneRing" );
QString
filename
(
"./export/scenario
3
."
);
QString
filename
(
"./export/scenario
5
."
);
filename
.
append
((
tmpNb
.
str
()).
c_str
());
filename
.
append
(
".png"
);
// getQGLWidget()->setSnapshotFileName(filename);
...
...
@@ -2090,8 +2090,10 @@ int main(int argc, char** argv)
sa
.
initGUI
()
;
glewInit
();
sa
.
cam_output_file
.
open
(
"src/cam.out"
,
std
::
ofstream
::
out
);
sa
.
readCameraInputFile
(
"src/cam.scn3.spline"
);
sa
.
cam_output_file
.
open
(
"cams/cam.out"
,
std
::
ofstream
::
out
);
char
camfile
[
100
];
sprintf
(
camfile
,
"cams/cam.scn%d.spline"
,
config
);
sa
.
readCameraInputFile
(
camfile
);
if
(
sa
.
cif_exists
)
{
int
i
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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