Commit bc6621cb authored by Sylvain Thery's avatar Sylvain Thery

resolving compil CGoGN update

parent 63f28931
......@@ -83,8 +83,7 @@ public:
void exportInfoFace(std::ofstream& out, Dart d) ;
bool exportScenePov(PFP::MAP& map, PFP::TVEC3& position, const std::string& filename,
PFP::VEC3 cameraPos, PFP::VEC3 cameraLook, PFP::VEC3 translate,
float angle_X, float angle_Y, float angle_Z,
const FunctorSelect& good = SelectorTrue()) ;
float angle_X, float angle_Y, float angle_Z) ;
#endif
void cb_keyPress(int keycode) ;
......
......@@ -180,8 +180,8 @@ void EnvMap::init(unsigned int config, REAL width, REAL height, REAL minSize, RE
// et2.triangule();
//subdivision to create footpath
SelectorDartNoBoundary<PFP::MAP> nb(map);
Algo::Surface::Modelisation::TwoNPlusOneSubdivision<PFP,PFP::TVEC3, VEC3>(map,position,nb);
// SelectorDartNoBoundary<PFP::MAP> nb(map);
Algo::Surface::Modelisation::TwoNPlusOneSubdivision<PFP,PFP::TVEC3, VEC3>(map,position);
markPedWay();
scale(20.0f);
......
......@@ -152,8 +152,8 @@ void MovingMesh::animate()
void MovingMesh::draw()
{
m_positionVBO->updateData(position) ;
m_render->initPrimitives<PFP>(map, allDarts, Algo::Render::GL2::TRIANGLES) ;
m_render->initPrimitives<PFP>(map, allDarts, Algo::Render::GL2::LINES) ;
m_render->initPrimitives<PFP>(map, Algo::Render::GL2::TRIANGLES) ;
m_render->initPrimitives<PFP>(map, Algo::Render::GL2::LINES) ;
m_simpleColorShader->setColor(Geom::Vec4f(1.0,0.627,0.0,0.));
m_render->draw(m_simpleColorShader, Algo::Render::GL2::TRIANGLES);
m_simpleColorShader->setColor(Geom::Vec4f(0.0,0.0,0.0,0.));
......
......@@ -694,7 +694,7 @@ void resetPartSubdiv(Obstacle* o)
if (mo != NULL)
{
VEC3 pos =mo->registering_part->getPosition();
mo->registering_part->CGoGN::Algo::MovingObjects::ParticleBase<PFP>::move(Algo::Surface::Geometry::faceCentroid<PFP>(mo->sim_->envMap_.map, mo->registering_part->d, mo->sim_->envMap_.position)) ;
mo->registering_part->CGoGN::Algo::Surface::MovingObjects::ParticleBase<PFP>::move(Algo::Surface::Geometry::faceCentroid<PFP>(mo->sim_->envMap_.map, mo->registering_part->d, mo->sim_->envMap_.position)) ;
mo->registering_part->setState(FACE) ;
mo->registering_part->move(pos) ;
......
......@@ -190,22 +190,22 @@ void SocialAgents::initRendering()
{
if(simulator.config==5)
{
m_render_scenary->initPrimitives<PFP>(simulator.envMap_.mapScenary, allDarts, Algo::Render::GL2::LINES,false) ;
m_render_scenary->initPrimitives<PFP>(simulator.envMap_.mapScenary, allDarts, Algo::Render::GL2::TRIANGLES,false) ;
m_render_scenary->initPrimitives<PFP>(simulator.envMap_.mapScenary, Algo::Render::GL2::LINES,false) ;
m_render_scenary->initPrimitives<PFP>(simulator.envMap_.mapScenary, Algo::Render::GL2::TRIANGLES,false) ;
m_render->initPrimitives<PFP>(simulator.envMap_.map, allDarts, Algo::Render::GL2::LINES,false) ;
m_render->initPrimitives<PFP>(simulator.envMap_.map, allDarts, Algo::Render::GL2::TRIANGLES,false) ;
m_render->initPrimitives<PFP>(simulator.envMap_.map, Algo::Render::GL2::LINES,false) ;
m_render->initPrimitives<PFP>(simulator.envMap_.map, Algo::Render::GL2::TRIANGLES,false) ;
m_renderPedway->initPrimitives<PFP>(simulator.envMap_.map, allDarts, Algo::Render::GL2::LINES,false) ;
m_renderPedway->initPrimitives<PFP>(simulator.envMap_.map, allDarts, Algo::Render::GL2::TRIANGLES,false) ;
m_renderPedway->initPrimitives<PFP>(simulator.envMap_.map, Algo::Render::GL2::LINES,false) ;
m_renderPedway->initPrimitives<PFP>(simulator.envMap_.map, Algo::Render::GL2::TRIANGLES,false) ;
}
else
{
m_render->initPrimitives<PFP>(simulator.envMap_.map, allDarts, Algo::Render::GL2::LINES,false) ;
m_render->initPrimitives<PFP>(simulator.envMap_.map, allDarts, Algo::Render::GL2::TRIANGLES,false) ;
m_render->initPrimitives<PFP>(simulator.envMap_.map, Algo::Render::GL2::LINES,false) ;
m_render->initPrimitives<PFP>(simulator.envMap_.map, Algo::Render::GL2::TRIANGLES,false) ;
}
m_renderTopo->updateData<PFP>(simulator.envMap_.map, simulator.envMap_.position, 0.9, 0.9, allDarts);
m_renderTopo->updateData<PFP>(simulator.envMap_.map, simulator.envMap_.position, 0.9, 0.9);
for(unsigned int i=0 ; i < simulator.movingObstacles_.size() ; ++i)
......@@ -359,13 +359,13 @@ void SocialAgents::updateAgentPredTriVBO()
void SocialAgents::updateVBOprimitives(int upType)
{
if(upType & Algo::Render::GL2::TRIANGLES)
m_render->initPrimitives<PFP>(simulator.envMap_.map, allDarts, Algo::Render::GL2::TRIANGLES, false) ;
m_render->initPrimitives<PFP>(simulator.envMap_.map, Algo::Render::GL2::TRIANGLES, false) ;
if(upType & Algo::Render::GL2::LINES)
m_render->initPrimitives<PFP>(simulator.envMap_.map, allDarts, Algo::Render::GL2::LINES,false) ;
m_render->initPrimitives<PFP>(simulator.envMap_.map, Algo::Render::GL2::LINES,false) ;
if(upType & Algo::Render::GL2::POINTS)
m_render->initPrimitives<PFP>(simulator.envMap_.map, allDarts, Algo::Render::GL2::POINTS) ;
m_render->initPrimitives<PFP>(simulator.envMap_.map, Algo::Render::GL2::POINTS) ;
}
//-----------------------------------
......@@ -837,7 +837,7 @@ void SocialAgents::animate()
updateVBOprimitives(Algo::Render::GL2::LINES);
if(drawEnvTopo)
m_renderTopo->updateData<PFP>(simulator.envMap_.map, simulator.envMap_.position, 0.9, 0.9, allDarts);
m_renderTopo->updateData<PFP>(simulator.envMap_.map, simulator.envMap_.position, 0.9, 0.9);
// gettimeofday(&endTime, NULL) ;
// seconds = endTime.tv_sec - startTime.tv_sec ;
......@@ -1109,8 +1109,7 @@ void SocialAgents::exportInfoFace(std::ofstream& out, Dart d)
bool SocialAgents::exportScenePov(PFP::MAP& map, PFP::TVEC3& position, const std::string& filename,
PFP::VEC3 cameraPos, PFP::VEC3 cameraLook, PFP::VEC3 translate,
float angle_X, float angle_Y, float angle_Z,
const FunctorSelect& good)
float angle_X, float angle_Y, float angle_Z)
{
static const bool draft = false ;
static const bool highlightAgent = false ;
......@@ -1354,10 +1353,18 @@ bool SocialAgents::exportScenePov(PFP::MAP& map, PFP::TVEC3& position, const std
}
}
SelectorMarked sm(highlight) ;
SelectorUnmarked sum(highlight) ;
Algo::Surface::ExportPov::exportMeshPlain<PFP>(out, map, position, "facesHighlighted", sm) ;
Algo::Surface::ExportPov::exportMeshPlain<PFP>(out, map, position, "myMesh", sum) ;
// set browser and export
MapBrowserSelector mbs1(map,SelectorMarked(highlight));
map.setBrowser(&mbs1);
Algo::Surface::ExportPov::exportMeshPlain<PFP>(out, map, position, "facesHighlighted") ;
// set browser and export
MapBrowserSelector mbs2(map,SelectorUnmarked(highlight));
map.setBrowser(&mbs2);
Algo::Surface::ExportPov::exportMeshPlain<PFP>(out, map, position, "myMesh") ;
// use all map
map.setBrowser(NULL);
out << "object {facesHighlighted" << std::endl ;
out << "rotate <" << angleX << "," << angleY << "," << angleZ << "> " << std::endl ;
......@@ -1372,15 +1379,23 @@ bool SocialAgents::exportScenePov(PFP::MAP& map, PFP::TVEC3& position, const std
if(exportCity)
{
SelectorCellUnmarked<FACE> sum(simulator.envMap_.pedWayMark);
Algo::Surface::ExportPov::exportMeshPlain<PFP>(out, simulator.envMap_.map, simulator.envMap_.position, "myCity", sum) ;
SelectorCellMarked<FACE> sm(simulator.envMap_.pedWayMark);
Algo::Surface::ExportPov::exportMeshPlain<PFP>(out, simulator.envMap_.map, simulator.envMap_.position, "myCityPed", sm) ;
Algo::Surface::ExportPov::exportMeshPlain<PFP>(out,simulator.envMap_.mapScenary,simulator.envMap_.positionScenary,"myMesh",good);
// set browser and export
MapBrowserSelector mbs1(map,SelectorCellUnmarked<FACE>(simulator.envMap_.pedWayMark));
map.setBrowser(&mbs1);
Algo::Surface::ExportPov::exportMeshPlain<PFP>(out, simulator.envMap_.map, simulator.envMap_.position, "myCity") ;
// set browser and export
MapBrowserSelector mbs2(map,SelectorCellMarked<FACE>(simulator.envMap_.pedWayMark));
map.setBrowser(&mbs2);
Algo::Surface::ExportPov::exportMeshPlain<PFP>(out, simulator.envMap_.map, simulator.envMap_.position, "myCityPed") ;
// use all map
map.setBrowser(NULL);
Algo::Surface::ExportPov::exportMeshPlain<PFP>(out,simulator.envMap_.mapScenary,simulator.envMap_.positionScenary,"myMesh");
}
else
{
Algo::Surface::ExportPov::exportMeshPlain<PFP>(out,simulator.envMap_.map,simulator.envMap_.position,"myMesh",good);
Algo::Surface::ExportPov::exportMeshPlain<PFP>(out,simulator.envMap_.map,simulator.envMap_.position,"myMesh");
}
// DartMarkerStore road(map);
......@@ -1412,7 +1427,7 @@ bool SocialAgents::exportScenePov(PFP::MAP& map, PFP::TVEC3& position, const std
if (wireDisplay)
{
Algo::Surface::ExportPov::exportMeshWire<PFP>(out, map, position, "myMeshWire", SelectorTrue()) ;
Algo::Surface::ExportPov::exportMeshWire<PFP>(out, map, position, "myMeshWire") ;
out << "object {myMeshWire" << std::endl ;
out << "rotate <" << angleX << "," << angleY << "," << angleZ << "> " << std::endl ;
out << "translate <" << translate[0] << "," << translate[1] << "," << translate[2]
......
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