Construction selon la graine passée en paramètre si elle existe, sinon

construction avec un graine aléatoire.
This commit is contained in:
Yoann 2012-01-19 20:44:42 +01:00
parent 47a70fdee5
commit d196b120a1
2 changed files with 6 additions and 2 deletions

View File

@ -1,13 +1,17 @@
#include "all_includes.hh"
int main() {
int main(int argc, char* argv[]) {
// Générer une tile de base
if(argc > 1)
Chose::initialSeed = (unsigned int) atoi(argv[1]);
std::cout << "Initial seed = " << Chose::initialSeed << std::endl;
float size = 500 * 100;
Vertex ne(size, size, 0);
Vertex se(size, 0, 0);
Vertex sw(0, 0, 0);
Vertex nw(0, size, 0);
Chose* c = new QuartierQuad(Quad(ne, se, sw, nw));
c->triangulation();
c->updateAABB();

View File

@ -182,4 +182,4 @@ void Chose::drawAABB() {
);
}
unsigned int Chose::initialSeed = 1896509207;//random_seed();
unsigned int Chose::initialSeed = random_seed();//1896509207;