Commit af8747b0 authored by pitiot's avatar pitiot

final

parent 5fbd799d
......@@ -92,7 +92,7 @@ void generateCity(EnvMap& envMap, unsigned int nbBuildings, float minArea, float
#ifndef TWO_AND_HALF_DIM
generateBuilding<PFP>(envMap, d, (1 + (rand() % 3)) * maxHeight, rand() % 4) ;
#else
generateBuilding<PFP>(envMap, d, (1 + (rand() % 3)) * maxHeight, rand() % 3) ;
generateBuilding<PFP>(envMap, d, (1 + (rand() % 3)) * maxHeight, rand() % 4) ;
#endif
--nbBuilding ;
......@@ -486,6 +486,7 @@ Dart generateBuilding(EnvMap& envMap, Dart d, float height, unsigned int buildin
height / 2.0f) ;
}
bool spike = rand() % 2 ;
#ifndef TWO_AND_HALF_DIM
if (spike)
{
typename PFP::VEC3 c = Algo::Surface::Geometry::faceCentroid<PFP>(map, dRoof, position) ;
......@@ -493,6 +494,7 @@ Dart generateBuilding(EnvMap& envMap, Dart d, float height, unsigned int buildin
dRoof = Algo::Surface::Modelisation::trianguleFace<PFP>(map, dRoof) ;
position[dRoof] = c ;
}
#endif
break ;
}
}
......
......@@ -200,7 +200,7 @@ void EnvMap::init(unsigned int config, REAL width, REAL height, REAL minSize, RE
break;
case 6:
CityGenerator::generatePlanet<PFP>(*this);
CityGenerator::generateCity<PFP>(*this,200, 1000.0f) ;
CityGenerator::generateCity<PFP>(*this,200, 1000.0f, 20.0f) ;
break;
case 7 :
......@@ -209,7 +209,7 @@ void EnvMap::init(unsigned int config, REAL width, REAL height, REAL minSize, RE
// CityGenerator::importObj<PFP>(*this, "./meshRessources/knot3Centered.obj");
CityGenerator::importObj<PFP>(*this, "./meshRessources/testTaches.obj");
scale(150.0f);
CityGenerator::generateCity<PFP>(*this,200, 150.0f, 10.0f) ;
CityGenerator::generateCity<PFP>(*this,300, 150.0f, 15.0f) ;
break;
case 8 :
......@@ -218,12 +218,12 @@ void EnvMap::init(unsigned int config, REAL width, REAL height, REAL minSize, RE
CityGenerator::importObj<PFP>(*this, "./meshRessources/knot3Centered.obj");
scale(150.0f);
CityGenerator::generateCity<PFP>(*this,200, 150.0f,5.0f) ;
CityGenerator::generateCity<PFP>(*this,500, 150.0f,5.0f) ;
break;
case 9 :
CityGenerator::importObj<PFP>(*this, "./meshRessources/simpleSlugSmoothTest.obj");
scale(150.0f);
CityGenerator::generateCity<PFP>(*this,200, 150.0f,30.0f) ;
CityGenerator::generateCity<PFP>(*this,200, 150.0f,15.0f) ;
break;
}
......
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