Commit 56ab7f86 authored by Arash HABIBI's avatar Arash HABIBI

debut_scenario5

parent 23ffe43f
......@@ -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.0f;
position_Export[d] += VEC3(2000,0,0);
}
......
......@@ -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 ;
}
//-----------------------
......
......@@ -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.1f);
m_shaderTexAgent->setAmbient(0.5f);
......@@ -1194,7 +1194,7 @@ void SocialAgents::animate()
// QString filename("./export/meshCercleBA" );
// QString filename("./export/meshCorridorBA" );
// QString filename("./export/oneRing" );
QString filename("./export/scenario3." );
QString filename("./export/scenario5." );
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;
......
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