Commit ac85ddc2 authored by Jund Thomas's avatar Jund Thomas
Browse files

import/export city ok

parent 9c4d995b
......@@ -50,9 +50,15 @@ void generatePathToUpperStair(typename PFP::MAP& map, typename PFP::TVEC3& posit
/*******************************************************************************/
//template <typename PFP>
//void generatePlanet(typename PFP::MAP& map, typename PFP::TVEC3& position, CellMarker<EDGE>& obstacleMark,
// CellMarker<FACE>& buildingMark, float radius, unsigned int nbSquares) ;
template <typename PFP>
void generatePlanet(EnvMap& envMap) ;
template <typename PFP>
void generatePlanet(typename PFP::MAP& map, typename PFP::TVEC3& position, CellMarker<EDGE>& obstacleMark,
CellMarker<FACE>& buildingMark, float radius, unsigned int nbSquares) ;
void planetify(typename PFP::MAP& map, typename PFP::TVEC3& position, float r);
/*******************************************************************************/
......
......@@ -622,6 +622,43 @@ void generatePlanet(EnvMap& envMap)
prim.embedSphere((xRadius+yRadius)/2.0f) ;
}
template <typename PFP>
void planetify(typename PFP::MAP& map, typename PFP::TVEC3& position, float r)
{
Geom::BoundingBox<typename PFP::VEC3> bb ;
bb = Algo::Geometry::computeBoundingBox<PFP>(map, position) ;
VEC3 diff = bb.max() - bb.min();
float width = diff[0];
float height = diff[1];
float nR = std::max(width, height);
typedef typename PFP::VEC3 VEC3 ;
TraversorV<typename PFP::MAP> tv(map);
//apply inverted transformation to build a sphere from planar coordinates (not working)
for(Dart d = tv.begin() ; d != tv.end() ; d = tv.next())
{
VEC3 p = position[d];
// p -= bb.min();
p -= bb.center();
// p /= (nR/2.0f);
p.normalize();
// position[d] = VEC3(
// 2.0f*p[0]/(1.0f+(p[0]*p[0])+(p[1]*p[1])),
// 2.0f*p[1]/(1.0f+(p[0]*p[0])+(p[1]*p[1])),
// (-1.0f+(p[0]*p[0])+(p[1]*p[1]))/(1.0f+(p[0]*p[0])+(p[1]*p[1]))
// );
//inverted Lambert azimuthal equal-area projection (not working)
position[d] = VEC3(
sqrt(1.0f-((p[0]*p[0])+(p[1]*p[1]))/4.0f*p[0]),
sqrt(1.0f-((p[0]*p[0])+(p[1]*p[1]))/4.0f*p[1]),
-1.0f+((p[0]*p[0])+(p[1]*p[1]))/2.0f);
}
}
template <typename PFP>
void simplifyFreeSpace(typename PFP::MAP& map, typename PFP::TVEC3& position,
CellMarker<EDGE>& obstacleMark, CellMarker<FACE>& buildingMark)
......
......@@ -91,9 +91,11 @@ void EnvMap::init(unsigned int config, REAL width, REAL height, REAL minSize, RE
case 5 :
{
std::cout << "?" << std::endl;
// std::string filename = "./svg/planet.svg" ;
std::string filename = "./svg/mapRoads.svg" ;
// std::string filename = "./svg/simpleCross.svg" ;
Algo::Import::importSVG<PFP>(map, filename, position, obstacleMark, buildingMark) ;
// CityGenerator::planetify<PFP>(map, position, 10.0f);
std::cout << "test" << std::endl;
......@@ -159,8 +161,11 @@ void EnvMap::init(unsigned int config, REAL width, REAL height, REAL minSize, RE
et.triangule();
//subdivision to create footpath
// SelectorDartNoBoundary<PFP::MAP> nb(map);
// Algo::Modelisation::TwoNPlusOneSubdivision<PFP,PFP::TVEC3, VEC3>(map,position,nb);
// SelectorCellUnmarked<EDGE> nb(obstacleMark);
SelectorDartNoBoundary<PFP::MAP> nb(map);
// SelectorTrue alldarts;
Algo::Modelisation::TwoNPlusOneSubdivision<PFP,PFP::TVEC3, VEC3>(map,position,nb);
markPedWay();
// Algo::BooleanOperator::mergeVertices<PFP>(map, position) ;
// map.closeMap() ;
......
......@@ -411,19 +411,19 @@ void Simulator::setupCorridorScenario(unsigned int nbAgents, unsigned int nbObst
//for generating a random path
// unsigned int dartDistForPath = 50 ;
// mo4->goals_.clear() ;
// Dart dStart = mo4->registering_part->d;
// Dart dStop = dStart ;
// for (unsigned int j = 0 ; envMap_.buildingMark.isMarked(dStop) || j < dartDistForPath + rand() * 20 || envMap_.map.sameFace(dStop, dStart) ; ++j)
// {
// envMap_.map.next(dStop) ;
// if (dStop == envMap_.map.end())
// dStop = envMap_.map.begin() ;
// }
//
// addPathToObstacle(mo4, dStart, dStop);
// addPathToObstacle(mo4, dStop, dStart);
unsigned int dartDistForPath = 50 ;
mo4->goals_.clear() ;
Dart dStart = mo4->registering_part->d;
Dart dStop = dStart ;
for (unsigned int j = 0 ; envMap_.buildingMark.isMarked(dStop) || j < dartDistForPath + rand() * 20 || envMap_.map.sameFace(dStop, dStart) ; ++j)
{
envMap_.map.next(dStop) ;
if (dStop == envMap_.map.end())
dStop = envMap_.map.begin() ;
}
addPathToObstacle(mo4, dStart, dStop);
addPathToObstacle(mo4, dStop, dStart);
movingObstacles_.push_back(mo4);
}
......
......@@ -148,15 +148,6 @@ void SocialAgents::cb_redraw()
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL) ;
renderAgent(sim.envMap_, *it, drawAgentsNeighborDist, drawAgentsObstacleDist,
(*it)->color1, (*it)->color2, (*it)->color3) ;
// for (std::vector<std::pair<float, Dart> >::iterator obst = (*it)->obstacleNeighbors_.begin();
// obst != (*it)->obstacleNeighbors_.end() && obst->first < (*it)->rangeSq_; ++obst)
// {
// glColor3f(0.0f, 1.0f, 1.0f) ;
// glLineWidth(10.0f) ;
// renderDart(sim.envMap_, obst->second) ;
// }
}
// CellMarker m(sim.envMap_.map, FACE) ;
......@@ -217,30 +208,10 @@ void SocialAgents::cb_redraw()
{
for (std::vector<MovingObstacle*>::iterator it = sim.movingObstacles_.begin() ; it != sim.movingObstacles_.end() ; ++it)
{
// MovingObstacle* mo = *it ;
//affiche les sommets des obstacles
// for (unsigned int i =0; i< (*it)->nbVertices;i++)
// {
// VEC3 pos = (*it)->obstacles_[i]->p1;
// glColor3f(1.0f, 0.8f, 0.0f);
// glBegin(GL_POLYGON);
// for(unsigned int i = 0; i < 5; ++i)
// glVertex3f(pos[0] + (cosT[i] * 1.5f), pos[1] + (sinT[i] * 1.5f), pos[2]+0.01f);
// glEnd();
// pos = (*it)->obstacles_[i]->p2;
// glColor3f(1.0f, 0.0f, 0.8f);
// glBegin(GL_POLYGON);
// for(unsigned int i = 0; i < 5; ++i)
// glVertex3f(pos[0] + (cosT[i] * 1.5f), pos[1] + (sinT[i] * 1.5f), pos[2]+0.01f);
// glEnd();
// }
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL) ;
glColor3f(1.0f, 1.0f, 1.0f) ;
glLineWidth(1.0f) ;
// if((*it)->index==74)
// {
// glColor3f(1.0f, 0.0f, 0.5f) ;
// }
glBegin(GL_POLYGON) ;
for (unsigned int i = 0 ; i < ((*it)->nbVertices) ; ++i)
......@@ -429,7 +400,7 @@ void SocialAgents::cb_redraw()
if (drawObstacles)
{
CellMarker<FACE> dmo(sim.envMap_.map) ;
DartMarker dmo(sim.envMap_.map) ;
for (Dart d = sim.envMap_.map.begin() ; d != sim.envMap_.map.end() ; sim.envMap_.map.next(d))
{
if (!dmo.isMarked(d))
......@@ -443,30 +414,21 @@ void SocialAgents::cb_redraw()
// renderFace(sim.envMap_,d);
// }
///count neighbor obst
// if (sim.envMap_.neighborObstvect[d].size()!=0)
// CGoGNout<<"Cellule : "<<d<<" obstacles voisins : "<< sim.envMap_.neighborObstvect[d].size()<<CGoGNendl;
dmo.mark(d);
// if ((sim.envMap_.obstvect[d].size()) != 0)
// {
// renderFace(sim.envMap_, d) ;
// }
dmo.mark(d);
// if(sim.envMap_.obstacleMark.isMarked(d))
// {
// renderDart(sim.envMap_,d);
// }
if ((sim.envMap_.obstvect[d].size()) != 0)
if(sim.envMap_.map.isBoundaryMarked(d))
{
renderFace(sim.envMap_, d) ;
// CGoGNout<<"Dart : "<< d << " contient "<<sim.envMap_.obstvect[d].size()<< "obstacles"<<CGoGNendl;
// for(std::vector<Obstacle*>::iterator it =sim.envMap_.obstvect[d].begin(); it!= sim.envMap_.obstvect[d].end(); ++it)
// {
// VEC3 p1=(*it)->p1;
// VEC3 p2=(*it)->p2;
// glColor3f(1.0f, 0.0f, 0.0f);
// glLineWidth(5.0f);
// glBegin(GL_LINES);
// glVertex3f(p1[0],p1[1],p1[2]);
// glVertex3f(p2[0],p2[1],p2[2]);
// glEnd();
// }
renderDart(sim.envMap_,d);
}
}
}
......@@ -516,11 +478,6 @@ void SocialAgents::cb_redraw()
1.0, sim.envMap_.positionScenary,
sim.envMap_.normalScenary) ;
}
// glColor3f(1.0f, 1.0f, 0.0f);
// glLineWidth(5.0f);
// renderFace(sim.envMap_,88);
//
// renderDart(sim.envMap_,89);
// glPushMatrix() ;
// glBegin(GL_LINES) ;
......@@ -578,38 +535,6 @@ void SocialAgents::cb_redraw()
// glEnd() ;
// glPopMatrix() ;
// glColor3f(0.0f, 1.0f, 0.0f) ;
// glLineWidth(5.0f) ;
// CellMarker dmb(sim.envMap_.map, FACE) ;
// for (Dart d = sim.envMap_.map.begin(); d != sim.envMap_.map.end(); sim.envMap_.map.next(d))
// {
// if (!dmb.isMarked(d))
// {
// dmb.mark(d) ;
// if (sim.envMap_.buildingMark.isMarked(d))
// {
// VEC3 c = Algo::Geometry::faceCentroid<PFP>(sim.envMap_.map, d, sim.envMap_.position);
// glBegin(GL_LINES) ;
// Dart dd = d ;
// do
// {
// VEC3 p1 = sim.envMap_.position[dd] ;
// VEC3 p2 = sim.envMap_.position[sim.envMap_.map.phi1(dd)] ;
// VEC3 vec = c - p1 ;
// p1 = p1 + vec * 0.25f ;
// vec = c - p2 ;
// p2 = p2 + vec * 0.25f ;
//
// glVertex3f(p1[0], p1[1], p1[2]) ;
// glVertex3f(p2[0], p2[1], p2[2]) ;
//
// dd = sim.envMap_.map.phi1(dd) ;
// } while (dd != d) ;
// glEnd() ;
// }
// }
// }
++frames ;
struct timespec realTime ;
clock_gettime(CLOCK_MONOTONIC, &realTime) ;
......@@ -704,7 +629,7 @@ void SocialAgents::animate()
std::ostringstream oss ;
std::ostringstream tmpNb ;
tmpNb << std::setfill('0') << std::setw(4) << nbIterations ;
oss << "./corridorTake2/takeTwo" << tmpNb.str() << ".pov" ;
oss << "./city/talesOfTwo" << tmpNb.str() << ".pov" ;
std::string chaine = oss.str() ;
// VEC3 agPos = sim.agents_[0]->meanPos_ ;
// agPos[2] = agPos[1] ;
......@@ -768,8 +693,13 @@ void SocialAgents::animate()
// VEC3 camLook(0, 0, 0) ;
//corridor take2
VEC3 camPos(-350, 200, 0) ;
VEC3 camLook(0, 0, 0) ;
// VEC3 camPos(-350, 200, 0) ;
// VEC3 camLook(0, 0, 0) ;
//openStreetMap mapRoad & mapBuildings
VEC3 camPos(-200, 100, 500) ;
VEC3 camLook(1000, 0, 0) ;
exportScenePov(sim.envMap_.map,sim.envMap_.position,chaine,camPos,camLook,VEC3(0.0f,0,0),0,0,0);
// exportScenePov(sim.envMap_.map,sim.envMap_.position,chaine,VEC3(43,762,65),VEC3(0,762,0),VEC3(1.0f,0,0),0,0,0);
......@@ -840,12 +770,6 @@ void SocialAgents::exportInfoFace(std::ofstream& out, Dart d)
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()) ;
// col = col * 16777215 ;
// out << "pigment { color <" << (int(col / 256 / 256) % 256) / 256.0f << ","
// << (int(col / 256) % 256) / 256.0f << "," << (int(col) % 256) / 256.0f << "> }"
// << std::endl ;
//
// VEC3 pBase(ag->getPosition()) ;
// VEC3 posR(pBase) ;
//
......@@ -902,12 +826,6 @@ void SocialAgents::exportInfoFace(std::ofstream& out, Dart d)
out << "pigment { color <" << col[0] << "," << col[1] << "," << col[2] << "> }"
<< std::endl ;
// float col = float(j) / float(sim.agents_.size()) ;
// col = col * 16777215 ;
// out << "pigment { color <" << (int(col / 256 / 256) % 256) / 256.0f << ","
// << (int(col / 256) % 256) / 256.0f << "," << (int(col) % 256) / 256.0f << "> }"
// << std::endl ;
//
// VEC3 pBase(ag->getPosition()) ;
// VEC3 posR(pBase) ;
//
......@@ -946,12 +864,13 @@ bool SocialAgents::exportScenePov(PFP::MAP& map, PFP::TVEC3& position, const std
float angle_X, float angle_Y, float angle_Z,
const FunctorSelect& good)
{
static const bool draft = false ;
static const bool draft = true ;
static const bool highlightAgent = false ;
static const bool wireDisplay = false ;
static const bool infoFaces = false ;
static const bool exportPath = false ;
static const bool exportMovObst = true ;
static const bool exportCity = true ;
unsigned int highlightAgentNo = 0 ;
......@@ -990,10 +909,9 @@ bool SocialAgents::exportScenePov(PFP::MAP& map, PFP::TVEC3& position, const std
out << "#include \"Cowbow_animated_POV_geom.inc\"" << std::endl ;
out << "#include \"sombrero2_highres_POV_geom.inc\"" << std::endl ;
out << "#include \"sombrero3_highres_POV_geom.inc\"" << std::endl ;
out << "#include \"transforms.inc\"" << std::endl ;
}
out << "#include \"transforms.inc\"" << std::endl ;
// out
// << "#declare PosSpline = spline { natural_spline 0.0,<0,3000,-1> 0.3,<0,500,-1> 0.6,<250,200,200> 1.0,<500,75,400>}"
// << std::endl ;
......@@ -1022,12 +940,14 @@ bool SocialAgents::exportScenePov(PFP::MAP& map, PFP::TVEC3& position, const std
out << "texture{ pigment { color rgb <1, 1, 1>} finish { ambient 1 diffuse 0 } } }"
<< std::endl ;
// out << "plane { <0,1,0>, -0.001" ;
// out
// << "texture{ pigment { color rgb <0.6, 0.8, 0.6>} finish { ambient rgb 0.3 brilliance 0.2 } } }"
// << std::endl ;
//green ground
if(exportCity)
{
out << "plane { <0,1,0>, -0.001" ;
out << "texture{ pigment { color rgb <0.6, 0.8, 0.6>} finish { ambient rgb 0.3 brilliance 0.2 } } }" << std::endl ;
}
// out << "light_source { <-800, 800, -800> color rgb 0.25 }" << std::endl ;
//
//set a high quality rendering
out << "global_settings {" << std::endl ;
out << "radiosity {" << std::endl ;
......@@ -1035,41 +955,12 @@ bool SocialAgents::exportScenePov(PFP::MAP& map, PFP::TVEC3& position, const std
// if(draft)
// out << "count 10 nearest_count 10 error_bound 0.25 recursion_limit 1 low_error_factor 0.2 gray_threshold 0.0 minimum_reuse 0.015 brightness 1.4 adc_bailout 0.01/2 normal off media off} max_trace_level 5}" << std::endl;
// else
out
<< "count 300 nearest_count 10 error_bound 0.10 recursion_limit 1 low_error_factor 0.2 gray_threshold 0.0 minimum_reuse 0.015 brightness 1.4 adc_bailout 0.01/2 normal off media off} max_trace_level 60}"
<< std::endl ;
// if (draft) for (unsigned int i = 0; i < sim.agents_.size(); ++i)
// {
// VEC3 pBase(sim.agents_[i]->getPosition()) ;
// VEC3 posR(pBase) ;
//
// Geom::Plane3D<float> pl = Algo::Geometry::facePlane<PFP>(map, sim.agents_[i]->part_.d,
// position) ;
// posR[2] -= 1000 ;
// Geom::intersectionPlaneRay(pl, posR, VEC3(0, 0, -1), posR) ;
//
// VEC3 dir = sim.agents_[i]->velocity_ ;
// dir.normalize() ;
// dir *= 5.0f ;
// out << "cylinder {" << std::endl ;
// out << "<0,0,0>, <" << dir[0] << "," << dir[1] << "," << dir[2] << ">,0.05" << std::endl ;
// out << "translate <" << posR[0] << "," << posR[1] << "," << posR[2] + 1 + 4 * 0.0638297872
// << "> " << std::endl ;
// out << "rotate <" << angleX - 90 << "," << angleY << "," << angleZ << "> " << std::endl ;
//
// out
// << "texture{ pigment{ color rgb<0.5,0.5,1.0>} finish { ambient rgb 0.1 brilliance 0.5 } }"
// << std::endl ;
// out << "}" << std::endl ;
// }
out << "count 300 nearest_count 10 error_bound 0.10 recursion_limit 1 low_error_factor 0.2 gray_threshold 0.0 minimum_reuse 0.015 brightness 1.4 adc_bailout 0.01/2 normal off media off} max_trace_level 60}" << std::endl ;
for (unsigned int i = 0 ; i < sim.agents_.size() ; ++i)
{
if (draft)
{
// out << "object {" << " sombrero2_lowres_ " << std::endl ;
// out << "scale 0.0638297872" << std::endl ;
out << "cylinder {" << " <0,0,0>, <0,6,0>, 1.5 " << std::endl ;
out << "scale 0.5" << std::endl ;
......@@ -1119,14 +1010,10 @@ bool SocialAgents::exportScenePov(PFP::MAP& map, PFP::TVEC3& position, const std
//57,2957795 : conversion from radian to degree
float myRot = acos(-dir[1]) * 57.2957795f ;
out << "rotate <0,0," << -90 + sign * myRot << ">" << std::endl ;
out << "rotate <" << angleX - 90 << "," << angleY << "," << angleZ << "> " << std::endl ;
// out << "translate <" << posR[0] << "," << posR[1] << "," << posR[2]+1+typeOfAgent*4*0.0638297872 << "> " << std::endl;
out << "translate <" << posR[0] << "," << posR[2] << "," << posR[1] << "> " << std::endl ;
out << "translate <" << translate[0] << "," << translate[1] << "," << translate[2] << ">"
<< std::endl ;
out << "translate <" << translate[0] << "," << translate[1] << "," << translate[2] << ">" << std::endl ;
out << "}" << std::endl ;
if (exportPath)
......@@ -1185,46 +1072,53 @@ bool SocialAgents::exportScenePov(PFP::MAP& map, PFP::TVEC3& position, const std
}
}
// if(!draft)
if (highlightAgent)
{
if (highlightAgent)
//find the cells to highlight
DartMarkerStore highlight(map) ;
Agent * ag = sim.agents_[highlightAgentNo] ;
for (Dart d = map.begin() ; d != map.end() ; map.next(d))
{
//find the cells to highlight
DartMarkerStore highlight(map) ;
Agent * ag = sim.agents_[highlightAgentNo] ;
for (Dart d = map.begin() ; d != map.end() ; map.next(d))
if (!highlight.isMarked(d))
{
if (!highlight.isMarked(d))
PFP::AGENTS listAgentInCell = sim.envMap_.agentvect[d] ;
if (std::find(listAgentInCell.begin(), listAgentInCell.end(), ag)
!= listAgentInCell.end())
{
PFP::AGENTS listAgentInCell = sim.envMap_.agentvect[d] ;
if (std::find(listAgentInCell.begin(), listAgentInCell.end(), ag)
!= listAgentInCell.end())
{
highlight.markOrbit<FACE>(d) ;
}
highlight.markOrbit<FACE>(d) ;
}
}
}
SelectorMarked sm(highlight) ;
SelectorUnmarked sum(highlight) ;
Algo::ExportPov::exportMeshPlain<PFP>(out, map, position, "facesHighlighted", sm) ;
Algo::ExportPov::exportMeshPlain<PFP>(out, map, position, "myMesh", sum) ;
out << "object {facesHighlighted" << std::endl ;
out << "rotate <" << angleX << "," << angleY << "," << angleZ << "> " << std::endl ;
out << "translate <" << translate[0] << "," << translate[1] << "," << translate[2]
<< ">" << std::endl ;
out
<< "texture{ pigment{ color rgb<0.4667,0.709,0.996>} finish { ambient rgb 0.35 brilliance 0.5 } } }"
<< std::endl ;
SelectorMarked sm(highlight) ;
SelectorUnmarked sum(highlight) ;
Algo::ExportPov::exportMeshPlain<PFP>(out, map, position, "facesHighlighted", sm) ;
Algo::ExportPov::exportMeshPlain<PFP>(out, map, position, "myMesh", sum) ;
out << "object {facesHighlighted" << std::endl ;
out << "rotate <" << angleX << "," << angleY << "," << angleZ << "> " << std::endl ;
out << "translate <" << translate[0] << "," << translate[1] << "," << translate[2]
<< ">" << std::endl ;
out
<< "texture{ pigment{ color rgb<0.4667,0.709,0.996>} finish { ambient rgb 0.35 brilliance 0.5 } } }"
<< std::endl ;
}
else
{
if(exportCity)
{
SelectorCellUnmarked<FACE> sum(sim.envMap_.pedWayMark);
Algo::ExportPov::exportMeshPlain<PFP>(out, sim.envMap_.map, sim.envMap_.position, "myCity", sum) ;
SelectorCellMarked<FACE> sm(sim.envMap_.pedWayMark);
Algo::ExportPov::exportMeshPlain<PFP>(out, sim.envMap_.map, sim.envMap_.position, "myCityPed", sm) ;
Algo::ExportPov::exportMeshPlain<PFP>(out,sim.envMap_.mapScenary,sim.envMap_.positionScenary,"myMesh",good);
}
else
{
Algo::ExportPov::exportMeshPlain<PFP>(out, sim.envMap_.map, sim.envMap_.position,
"myMesh", good) ;
Algo::ExportPov::exportMeshPlain<PFP>(out,sim.envMap_.map,sim.envMap_.position,"myMesh",good);
}
// Algo::ExportPov::exportMeshPlain<PFP>(out,sim.envMap_.mapScenary,sim.envMap_.positionScenary,"myMesh",good);
//
// DartMarkerStore road(map);
// for(Dart d=map.begin();d!=map.end();map.next(d))
// {
......@@ -1250,34 +1144,36 @@ bool SocialAgents::exportScenePov(PFP::MAP& map, PFP::TVEC3& position, const std
// SelectorMarked roadM(road);
// Algo::ExportPov::exportMeshPlain<PFP>(out,map,position,"myCityPed",sm);
// Algo::ExportPov::exportMeshPlain<PFP>(out,map,position,"myCity",roadM);
}
if (wireDisplay)
{
Algo::ExportPov::exportMeshWire<PFP>(out, map, position, "myMeshWire", SelectorTrue()) ;
out << "object {myMeshWire" << std::endl ;
out << "rotate <" << angleX << "," << angleY << "," << angleZ << "> " << std::endl ;
out << "translate <" << translate[0] << "," << translate[1] << "," << translate[2]
<< ">" << std::endl ;
out << "texture{ pigment{ color rgb<0,0,0>} } }" << std::endl ;
}
}
out << "object {myMesh" << std::endl ;
if (wireDisplay)
{
Algo::ExportPov::exportMeshWire<PFP>(out, map, position, "myMeshWire", SelectorTrue()) ;
out << "object {myMeshWire" << std::endl ;
out << "rotate <" << angleX << "," << angleY << "," << angleZ << "> " << std::endl ;
out << "translate <" << translate[0] << "," << translate[1] << "," << translate[2] << ">"
<< std::endl ;
out << "texture{ pigment{ color rgb 0.7} finish { ambient rgb 0.3 brilliance 0.5 } } }"
<< std::endl ;
out << "translate <" << translate[0] << "," << translate[1] << "," << translate[2]
<< ">" << std::endl ;
out << "texture{ pigment{ color rgb<0,0,0>} } }" << std::endl ;
}
// out << "object {myCityPed" << std::endl;
// out << "rotate <" << angleX << "," << angleY << "," << angleZ << "> " << std::endl;
// out << "translate <" << translate[0] << "," << translate[1] << "," << translate[2] << ">" << std::endl;
// out << "texture{ pigment{ color rgb 0.7} finish { ambient rgb 0.3 brilliance 0.5 } } }" << std::endl;
out << "object {myMesh" << std::endl ;
out << "rotate <" << angleX << "," << angleY << "," << angleZ << "> " << std::endl ;
out << "translate <" << translate[0] << "," << translate[1] << "," << translate[2] << ">"
<< std::endl ;
out << "texture{ pigment{ color rgb 0.7} finish { ambient rgb 0.3 brilliance 0.5 } } }"
<< std::endl ;
// out << "object {myCity" << std::endl;
// out << "rotate <" << angleX << "," << angleY << "," << angleZ << "> " << std::endl;
// out << "translate <" << translate[0] << "," << translate[1] << "," << translate[2] << ">" << std::endl;
// out << "texture{ pigment{ color rgb 0.6} finish { ambient rgb 0.3 brilliance 0.5 } } }" << std::endl;
if(exportCity)
{
out << "object {myCityPed" << std::endl;
out << "rotate <" << angleX << "," << angleY << "," << angleZ << "> " << std::endl;
out << "translate <" << translate[0] << "," << translate[1] << "," << translate[2] << ">" << std::endl;
out << "texture{ pigment{ color rgb 0.7} finish { ambient rgb 0.3 brilliance 0.5 } } }" << std::endl;
out << "object {myCity" << std::endl;
out << "rotate <" << angleX << "," << angleY << "," << angleZ << "> " << std::endl;
out << "translate <" << translate[0] << "," << translate[1] << "," << translate[2] << ">" << std::endl;
out << "texture{ pigment{ color rgb 0.6} finish { ambient rgb 0.3 brilliance 0.5 } } }" << std::endl;
}
// out << "texture{ pigment{ color rgb<1.0,1.0,1>} finish { ambient rgb 0.05 brilliance 0.5 } } }" << std::endl;
......
......@@ -36,14 +36,14 @@
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1680"
inkscape:window-height="994"
inkscape:window-height="1021"
id="namedview20587"
showgrid="false"
inkscape:zoom="1.8101935"
inkscape:cx="455.54369"
inkscape:cy="1150.26"
inkscape:window-x="1680"
inkscape:window-y="27"
inkscape:cx="1052.68"
inkscape:cy="244.15553"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="svg2" />
<defs
......@@ -14942,7 +14942,7 @@
sodipodi:nodetypes="ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc" />
<path
style="fill:#baa8a8;fill-opacity:0.9;fill-rule:nonzero;stroke:#330066;stroke-width:0.2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1"
d="m 591.06641,894.64062 -0.8086,-0.72265 5.38281,-5.5 5.58594,-5.70313 0.8086,0.65235 15.07421,-16.09375 13.82813,-14.80078 -0.72656,-0.83985 6.92968,-7.80859 3.5586,-4.01172 0.6914,0.44141 16.92188,-18.58204 11.85156,-14.23437 -1.13281,-0.75391 6.94922,-8.58984 3.11719,-3.87109 0.80078,0.87109 4.64843,-5.82813 2.38282,1.69141 22.0664,-11.98828 5.02735,9.58203 9.32422,17.80469 4.98437,9.52344 -14.23437,7.6289 -1.77344,0.9375 -4.07422,-7.50781 -1.51953,1.00781 -2.64844,-4.6289 1.91406,-0.83985 -5.33593,-9.40625 -9.84375,5.66016 -21.23829,25.28906 1.73047,1.64453 -3.87109,4.22266 -1.80859,-1.52344 -15.91407,18.45703 1.91016,1.78125 -3.75781,4.57813 -1.98438,-1.73047 -34.94531,37.67578 19.95703,21.97266 49.95703,7.83984 -0.19922,1.64844 -1.86718,15.96875 -12.33594,-1.61719 -27.36719,-3.52734 -15.42187,-2.01563 -14.71875,-15.48437 -22.86329,-24.0625 z"
d="m 591.06641,888.24062 -0.8086,-0.72265 5.38281,-5.5 5.58594,-5.70313 0.8086,0.65235 15.07421,-16.09375 13.82813,-14.80078 -0.72656,-0.83985 6.92968,-7.80859 3.5586,-4.01172 0.6914,0.44141 16.92188,-18.58204 11.85156,-14.23437 -1.13281,-0.75391 6.94922,-8.58984 3.11719,-3.87109 0.80078,0.87109 4.64843,-5.82813 2.38282,1.69141 22.0664,-11.98828 5.02735,9.58203 9.32422,17.80469 4.98437,9.52344 -14.23437,7.6289 -1.77344,0.9375 -4.07422,-7.50781 -1.51953,1.00781 -2.64844,-4.6289 1.91406,-0.83985 -5.33593,-9.40625 -9.84375,5.66016 -21.23829,25.28906 1.73047,1.64453 -3.87109,4.22266 -1.80859,-1.52344 -15.91407,18.45703 1.91016,1.78125 -3.75781,4.57813 -1.98438,-1.73047 -34.94531,37.67578 19.95703,21.97266 49.95703,7.83984 -0.19922,1.64844 -1.86718,15.96875 -12.33594,-1.61719 -27.36719,-3.52734 -15.42187,-2.01563 -14.71875,-15.48437 -22.86329,-24.0625 z"
id="path6503"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccccccccccccccccccccccccccccccccccccccccccccccccc" />
......@@ -15482,7 +15482,7 @@
sodipodi:nodetypes="ccccccccccccc" />
<path
style="fill:#baa8a8;fill-opacity:0.9;fill-rule:nonzero;stroke:#330066;stroke-width:0.2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1"
d="m 692.42187,835.43359 12.29297,-6.88672 3.11719,6.1836 -4.05469,2.18359 -2.85156,-0.36719 -2.02734,15.60157 5.65625,0.55468 -5.16407,44.33204 -5.74218,-0.65235 -2.79297,20.57813 -8.49219,-0.96485 z"
d="m 692.42187,829.03359 12.29297,-6.88672 3.11719,6.1836 -4.05469,2.18359 -2.85156,-0.36719 -2.02734,15.60157 5.65625,0.55468 -5.16407,44.33204 -5.74218,-0.65235 -2.79297,20.57813 -8.49219,-0.96485 z"
id="path6723"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccccccccccc" />
......@@ -15554,7 +15554,7 @@
sodipodi:nodetypes="cccccccccccccccccccccccc" />
<path
style="fill:#baa8a8;fill-opacity:0.9;fill-rule:nonzero;stroke:#330066;stroke-width:0.2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1"
d="m 681.85937,834.26953 10.5625,1.16406 -10.05859,80.5625 -1.22656,9.78125 -9.57422,-1.18359 z"
d="m 681.85937,827.86953 10.5625,1.16406 -10.05859,80.5625 -1.22656,9.78125 -9.57422,-1.18359 z"
id="path6747"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccccc" />
......@@ -16244,7 +16244,7 @@
sodipodi:nodetypes="cccccc" />