www

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

commit 40299aa45ba57495aecbdef8615d1458627d6d00
parent 3f038da4f8188011a7a2b9c9b45c1e7ba5f1abd0
Author: Georges Dupéron <jahvascriptmaniac+github@free.fr>
Date:   Tue, 16 Oct 2012 22:50:09 +0200

Popeyon !

Diffstat:
Mrules/arbre.cpp | 6++++++
Mrules/couleursDimensions.hh | 1+
2 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/rules/arbre.cpp b/rules/arbre.cpp @@ -106,4 +106,10 @@ void Arbre::feuille() { Quad cFeuillage(startFeuillage +uFeuillage +lFeuillage, startFeuillage -uFeuillage +lFeuillage, startFeuillage -uFeuillage -lFeuillage, startFeuillage +uFeuillage -lFeuillage); addGPUOcto(cFeuillage, cFeuillage + hFeuillage, c); + if (length < 20 && proba(seed, 12346, 0.1f)) { + Triangle tPapillon1(startFeuillage +uFeuillage +lFeuillage, startFeuillage -uFeuillage +lFeuillage, startFeuillage + hFeuillage * floatInRange(seed, 23448, -1, 0.3)); + Triangle tPapillon2(startFeuillage -uFeuillage -lFeuillage, startFeuillage +uFeuillage -lFeuillage, startFeuillage + hFeuillage * floatInRange(seed, 23448, -1, 0.3)); + addGPUTriangle(tPapillon1 + (hFeuillage * floatInRange(seed, 12347, 3, 6)), Couleurs::papillon); + addGPUTriangle(tPapillon2 + (hFeuillage * floatInRange(seed, 12347, 3, 6)), Couleurs::papillon); + } } diff --git a/rules/couleursDimensions.hh b/rules/couleursDimensions.hh @@ -28,6 +28,7 @@ public: static const unsigned int bordureTrottoir = 0xAAAAAA; static const unsigned int herbe = 0x0c4010; static const unsigned int feuillage = 0x11AA22; + static const unsigned int papillon = 0xaa88cc; static const unsigned int pomme = 0xAA2211; static const unsigned int tronc = 0x906050; static const unsigned int cielHaut = 0x3c14ff;