6 #include "VagueImage.h"
8 #include "StringTools.h"
10 #include "IndiceTools.h"
16 /*----------------------------------------------------------------------*\
18 \*---------------------------------------------------------------------*/
20 /*--------------------------------------*\
22 \*-------------------------------------*/
24 /*--------------------------------------*\
26 \*-------------------------------------*/
28 /*----------------------------------------------------------------------*\
30 \*---------------------------------------------------------------------*/
32 /*--------------------------------------*\
34 \*-------------------------------------*/
36 VagueImage::VagueImage(unsigned int w
, unsigned int h
, float dt
) :
39 this->ptrVagueMOO
=new VagueMOO(w
,h
,dt
);
42 VagueImage::~VagueImage(void)
47 /*--------------------------------------*\
49 \*-------------------------------------*/
52 * Override : call periodicly by the api
54 void VagueImage::fillImageGL(uchar4
* ptrTabPixels
, int w
, int h
)
56 ptrVagueMOO
->process(ptrTabPixels
,w
,h
);
60 * Override : call periodicly by the api
62 void VagueImage::animationStep(bool& isNeedUpdateView
)
64 ptrVagueMOO
->animationStep();
68 * Override call periodicly by the api
70 void VagueImage::paintPrimitives(Graphic2Ds
& graphic2D
)
72 const Font_A
* ptrFont
= graphic2D
.getFont(TIMES_ROMAN_24
);
77 graphic2D
.setColorRGB(r
, g
, b
);
81 float t
=ptrVagueMOO
->getT();
82 float dt
=ptrVagueMOO
->getDT();
84 string message
= "t= " + StringTools::toString(t
) + " dt=" + StringTools::toString(dt
);
85 graphic2D
.drawTitleTop(message
, ptrFont
);
90 graphic2D
.drawTitleBottom("API Image : Vague OMP", ptrFont
);
94 /*--------------------------------------*\
96 \*-------------------------------------*/
100 /*----------------------------------------------------------------------*\
102 \*---------------------------------------------------------------------*/