www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

couleursDimensions.hh (2375B)


      1 #ifndef _RULES_COLULEURSDIMENSIONS_HH_
      2 #define _RULES_COLULEURSDIMENSIONS_HH_
      3 
      4 #include "all_includes.hh"
      5 
      6 class Couleurs {
      7 public:
      8 	static unsigned int rgb(unsigned char r, unsigned char g, unsigned char b) {
      9 		return r * 0x10000 | g* 0x100 | b;
     10 	}
     11 	static unsigned char r(unsigned int color) { return ((color >> 16) & 0xff); };
     12 	static unsigned char g(unsigned int color) { return ((color >> 8) & 0xff); };
     13 	static unsigned char b(unsigned int color) { return (color & 0xff); };
     14 	static unsigned int mix(unsigned int colorA, unsigned int colorB, float mixA) {
     15 		float mixB = 1 - mixA;
     16 		return rgb(
     17 				(unsigned char)(r(colorA) * mixA + r(colorB) * mixB),
     18 				(unsigned char)(g(colorA) * mixA + g(colorB) * mixB),
     19 				(unsigned char)(b(colorA) * mixA + b(colorB) * mixB)
     20 		);
     21 	};
     22 	static const unsigned int mur = 0xF1E3AD;
     23 	static const unsigned int plafond = 0xA39E8B;
     24 	static const unsigned int plancher = 0xA5A079;
     25 	static const unsigned int toit = 0x961618;
     26 	static const unsigned int route = 0x363636;
     27 	static const unsigned int trottoir = 0x666666;
     28 	static const unsigned int bordureTrottoir = 0xAAAAAA;
     29 	static const unsigned int herbe = 0x0c4010;
     30 	static const unsigned int feuillage = 0x11AA22;
     31 	static const unsigned int papillon = 0xaa88cc;
     32 	static const unsigned int pomme = 0xAA2211;
     33 	static const unsigned int tronc = 0x906050;
     34 	static const unsigned int cielHaut = 0x3c14ff;
     35 	static const unsigned int cielBas = 0x7F7FFF;
     36 	static const unsigned int fog; // définie dans couleurs.cpp .
     37 };
     38 
     39 class Dimensions {
     40 public:
     41 	static const unsigned int largeurRoute = 200;
     42 	static const unsigned int largeurTrottoir = 140;
     43 	static const unsigned int hauteurEtage = 300;
     44 	static const unsigned int maxEtages = 5;
     45 	static const unsigned int hauteurToit = 200;
     46 	static const unsigned int hauteurTrottoir = 20;
     47 	static const unsigned int hauteurMaxBatiment = hauteurTrottoir + hauteurEtage * 2 + hauteurToit;
     48 	static const unsigned int minSurfaceSousBatiment = 100 * 100*100; // 100 m²
     49 	static const unsigned int minRayonPlace = 30 * 100; // 60 m
     50 	static const unsigned int maxRayonPlace = 2 * minRayonPlace; // 60 m
     51 
     52 	// Qualité
     53 	static const float splitFactor;
     54 	static const float mergeFactor;
     55 	static const unsigned int windowWidth = 1024;
     56 	static const unsigned int windowHeight = 768;
     57 	static const float frontFrustum;
     58 	static const float backFrustum;
     59 };
     60 
     61 #endif