a3373d9637ef0f20db0a4d0d9d09872f8dd98f7f
4 #include "DamierImage.h"
5 #include "StringTools.h"
8 #include "IndiceTools.h"
9 #include "ColorTools.h"
15 /*----------------------------------------------------------------------*\
17 \*---------------------------------------------------------------------*/
19 /*--------------------------------------*\
21 \*-------------------------------------*/
23 /*--------------------------------------*\
25 \*-------------------------------------*/
27 /*----------------------------------------------------------------------*\
29 \*---------------------------------------------------------------------*/
31 /*--------------------------------------*\
33 \*-------------------------------------*/
36 * DomaineMaths(0, 0, 2 * PI, 2 * PI) : par exemple, why not celui là!
38 DamierImage::DamierImage(unsigned int w
, unsigned int h
, float dt
, int n
) :
39 ImageFonctionelMOOs_A(w
, h
, DomaineMath(0, 0, 2 * PI
, 2 * PI
))
42 this->ptrDamierMOO
=new DamierMOO(w
,h
,dt
,n
);
44 setEnableDomaineOverlay(true);
47 DamierImage::~DamierImage(void)
52 /*--------------------------------------*\
54 \*-------------------------------------*/
58 * Called automatically by the API
60 void DamierImage::fillImageGL(uchar4
* ptrTabPixels
, int w
, int h
, const DomaineMath
& domaineMath
)
62 ptrDamierMOO
->process(ptrTabPixels
, w
, h
,domaineMath
);
67 * call periodicly by the api
69 void DamierImage::animationStep(bool& isNeedUpdateView
)
71 ptrDamierMOO
->animationStep();
76 * call periodicly by the api
78 void DamierImage::paintPrimitives(Graphic2Ds
& graphic2D
)
80 const Font_A
* ptrFont
= graphic2D
.getFont(TIMES_ROMAN_24
);
85 graphic2D
.setColorRGB(r
, g
, b
);
89 float t
=ptrDamierMOO
->getT();
90 int n
=ptrDamierMOO
->getN();
92 string message
= "t = " + StringTools::toString(t
) + " n = " + StringTools::toString(n
);
93 graphic2D
.drawTitleTop(message
, ptrFont
);
98 graphic2D
.drawTitleBottom("[API Image Fonctionelle] : Damier zoomable OMP", ptrFont
);
102 /*--------------------------------------*\
104 \*-------------------------------------*/
107 /*----------------------------------------------------------------------*\
109 \*---------------------------------------------------------------------*/