Commit 1c2c0da7 authored by Pierre Kraemer's avatar Pierre Kraemer
Browse files

yeah

parent 1d3e75a6
......@@ -37,6 +37,7 @@
#include "Algo/Export/exportPov.h"
#include "Utils/GLSLShader.h"
#include "Utils/colorMaps.h"
#include "Algo/Render/GL1/map_glRender.h"
#include "Algo/Render/GL1/topo_render.h"
......
......@@ -282,7 +282,7 @@ void SocialAgents::animate()
if(sim.globalTime_ - int(sim.globalTime_) == 0.0f && int(sim.globalTime_) % 10 == 0)
std::cout << sim.globalTime_ << " " << sim.envMap_.mapMemoryCost() << std::endl;
std::cout << "t : " << sim.globalTime_ << std::endl;
// std::cout << "t : " << sim.globalTime_ << std::endl;
timeval startTime;
gettimeofday(&startTime, NULL);
......@@ -369,17 +369,6 @@ void SocialAgents::animate()
updateGL();
}
inline Geom::Vec3f color_map_BCGYR (float x){
Geom::Vec3f r (0.0f,0.0f,0.0f);
if (x<0.0) {r[2]=1.0f;}
else if (x<0.25) {r[0]=0.0f; r[1]=4*x; r[2]=1.0f;}
else if (x<0.5) {r[0]=0.0f; r[1]=1.0f; r[2]=2.0f-4*x;}
else if (x<0.75) {r[0]=4*x-2; r[1]=1.0f;r[2]=0.0f;}
else if (x<1.0) {r[0]=1.0f; r[1]=4-4*x;r[2]=0.0f;}
else {r[0]=1.0f;}
return r;
}
void SocialAgents::exportInfoFace(std::ofstream& out, Dart d)
{
//get corner
......@@ -459,7 +448,7 @@ void SocialAgents::exportInfoFace(std::ofstream& out, Dart d)
out << "scale 0.5" << std::endl;
VEC3 col = color_map_BCGYR(float(j)/float(sim.agents_.size()));
VEC3 col = Utils::color_map_BCGYR(float(j)/float(sim.agents_.size()));
out << "pigment { color <" << col[0] << "," << col[1] << "," << col[2]<< "> }" << std::endl;
// float col = float(j)/float(sim.agents_.size());
......@@ -531,7 +520,7 @@ void SocialAgents::exportInfoFace(std::ofstream& out, Dart d)
out << "scale 0.5" << std::endl;
VEC3 col = color_map_BCGYR(float(j)/float(sim.agents_.size()));
VEC3 col = Utils::color_map_BCGYR(float(j)/float(sim.agents_.size()));
out << "pigment { color <" << col[0] << "," << col[1] << "," << col[2]<< "> }" << std::endl;
// float col = float(j)/float(sim.agents_.size());
......@@ -668,7 +657,7 @@ bool SocialAgents::exportScenePov(PFP::MAP& map, PFP::TVEC3& position, const std
out << "scale 0.5" << std::endl;
VEC3 col = color_map_BCGYR(float(i)/float(sim.agents_.size()));
VEC3 col = Utils::color_map_BCGYR(float(i)/float(sim.agents_.size()));
out << "pigment { color <" << col[0] << "," << col[1] << "," << col[2]<< "> }" << std::endl;
// unsigned int col = (unsigned int)(float(i)/float(sim.agents_.size())*0xfffffe);
......
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