Commit 3f8518a5 authored by pitiot's avatar pitiot
Browse files

pas granche

parent 1684fabf
......@@ -33,7 +33,7 @@ class ArticulatedObstacle;
#include "pfp.h"
//#define EXPORTING3
#define TWO_AND_HALF_DIM
//#define TWO_AND_HALF_DIM
#ifdef EXPORTING3
#include "Utils/Shaders/shaderPhongTexture.h"
......
......@@ -206,7 +206,7 @@ void EnvMap::init(unsigned int config, REAL width, REAL height, REAL minSize, RE
#ifndef SPATIAL_HASHING
map.init() ;
// registerObstaclesInFaces();
registerObstaclesInFaces();
// TODO Check registerWallInFaces();
// registerWallInFaces() ;
// subdivideAllToMaxLevel();
......@@ -804,7 +804,7 @@ void EnvMap::pushObstacleInOneRingCells(Obstacle * o, Dart d, int n)
mo->belonging_cells[n].push_back(d);
mo->addGeneralCell (d);
// mo->neighbor_cells[n].clear();
// if(o->index==1 && mo->index==279) CGoGNout <<"obstacle"<< o->index << " : "<< d << CGoGNendl;
Dart dd = d;
do
{
......@@ -835,16 +835,16 @@ void EnvMap::pushObstacleInCells(Obstacle* o, int n, const std::vector<Dart>& me
// mo->belonging_cells[n].clear();
// mo->neighbor_cells[n].clear();
mo->belonging_cells[n] = memo_cross;
// if(o->index==1 && mo->index==279) CGoGNout<<"obstacle"<< o->index << " : ";
for (std::vector<Dart>::iterator it = mo->belonging_cells[n].begin(); it != mo->belonging_cells[n].end(); ++it)
{
// CGoGNout <<"obstacle"<< o->p1 << "new cell : "<< *it << CGoGNendl;
// if(o->index==1 && mo->index==279) CGoGNout << *it << " ; ";
addElementToVector<Obstacle*>(obstvect[*it],o);
mo->addGeneralCell (*it);
}
// if(o->index==1 && mo->index==279) CGoGNout <<CGoGNendl;
addObstAsNeighbor(o, mo->belonging_cells[n], &(mo->neighbor_cells[n]));
for (std::vector<Dart>::iterator it = mo->neighbor_cells[n].begin(); it != mo->neighbor_cells[n].end(); ++it)
......
......@@ -290,7 +290,7 @@ void MovingObstacle::initGL()
// using simple shader with color
m_shader = new Utils::ShaderSimpleColor();
m_shader->setAttributePosition(m_positionVBO);
m_shader->setColor(Geom::Vec4f(0.,this->index==279,0.,0.));
m_shader->setColor(Geom::Vec4f(0.,1.,0.,0.));
// m_shader->setAmbiant(Geom::Vec4f(0.,1.,0.,0.));
// m_shader->setDiffuse(Geom::Vec4f(0.,1.,0.,0.));
......@@ -310,7 +310,7 @@ void MovingObstacle::draw()
// m_render->initPrimitives<PFP>(map, Algo::Render::GL2::TRIANGLES,false) ;
m_positionVBO->updateData(position);
// m_shader->setColor(Geom::Vec4f(movingObstacleNeighbors_.size()==0 ? 1.0f : 0,0.,0.,0.));
m_shader->setColor(Geom::Vec4f(1.0f,0.,0.,0.0));
m_shader->setColor(Geom::Vec4f(this->index==279,0.,0.,0.0));
m_render->draw(m_shader, Algo::Render::GL2::TRIANGLES);
m_shader->setColor(Geom::Vec4f(0.,0.,0.,0.));
m_render->draw(m_shader, Algo::Render::GL2::LINES);
......@@ -910,7 +910,7 @@ void resetPart(Obstacle * o, Dart d1)
void displayMO(Obstacle * o)
{
CGoGNout << "obstacle problematique : " << (o->mo->index) << CGoGNendl;
CGoGNout << "obstacle problematique : " <<(o->index) <<"du MO n° : "<< (o->mo->index) << CGoGNendl;
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
......
......@@ -724,7 +724,9 @@ void SocialAgents::cb_redraw()
for(unsigned int i = 0 ; i < simulator.movingObstacles_.size() ; ++i)
{
#ifdef SHADOWSHELL
Utils::ShaderFlat* moShader = m_obstShader[i];
if(simulator.movingObstacles_[i]->index==279){
Utils::ShaderFlat* moShader = m_obstShader[i];
// moShader->setAmbiant(Geom::Vec4f(0.43137254902,0.76862745098,0.8862745098,0.));
moShader->setAmbiant(Geom::Vec4f(0,0,0,0.));
moShader->setDiffuse(Geom::Vec4f(0.,0.,0.,0.));
......@@ -732,6 +734,7 @@ void SocialAgents::cb_redraw()
moShader->enableVertexAttribs();
glDrawArrays(GL_POLYGON, 0, simulator.movingObstacles_[i]->nbVertices);
moShader->disableVertexAttribs();
}
#endif
#ifdef EXPORTING_BOXES
......
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