+#include <iostream>\r
+#include <assert.h>\r
+#include <math.h>\r
+\r
+#include "MathTools.h"\r
+#include "Vague0Image.h"\r
+#include "StringTools.h"\r
+\r
+using std::cout;\r
+using std::endl;\r
+\r
+/*----------------------------------------------------------------------*\\r
+ |* Declaration *|\r
+ \*---------------------------------------------------------------------*/\r
+\r
+/*--------------------------------------*\\r
+ |* Imported *|\r
+ \*-------------------------------------*/\r
+\r
+extern void launchKernelVague0(uchar4* ptrDevPixels, int w, int h, float t);\r
+\r
+/*--------------------------------------*\\r
+ |* Public *|\r
+ \*-------------------------------------*/\r
+\r
+/*--------------------------------------*\\r
+ |* Private *|\r
+ \*-------------------------------------*/\r
+\r
+/*----------------------------------------------------------------------*\\r
+ |* Implementation *|\r
+ \*---------------------------------------------------------------------*/\r
+\r
+/*--------------------------------------*\\r
+ |* Public *|\r
+ \*-------------------------------------*/\r
+\r
+Vague0Image::Vague0Image(unsigned int w, unsigned int h, float dt) :\r
+ ImageMOOs_A(w, h)\r
+ {\r
+ assert(getW() == getH()); // image carrer\r
+\r
+ // Input\r
+ this->dt = dt;\r
+\r
+ // Tools\r
+ this->t = 0;\r
+ }\r
+\r
+Vague0Image::~Vague0Image(void)\r
+ {\r
+ // rien\r
+ }\r
+\r
+/*--------------------------------------*\\r
+ |* Override *|\r
+ \*-------------------------------------*/\r
+\r
+/**\r
+ * Override\r
+ * Call automaticly by the api\r
+ */\r
+void Vague0Image::animationStep(bool& isNeedUpdateView)\r
+ {\r
+ this->t += dt;\r
+ isNeedUpdateView = true; // true par default\r
+ }\r
+\r
+/**\r
+ * Override\r
+ * Call automaticly by the api\r
+ */\r
+void Vague0Image::fillImageGL(uchar4* ptrDevImageGL, int w, int h)\r
+ {\r
+ launchKernelVague0(ptrDevImageGL, w, h, t);\r
+ }\r
+\r
+/**\r
+ * Override\r
+ * Call automaticly by the api\r
+ */\r
+void Vague0Image::paintPrimitives(Graphic2Ds& graphic2D)\r
+ {\r
+ const Font_A* ptrFont = graphic2D.getFont(TIMES_ROMAN_24);\r
+\r
+ float r = 1;\r
+ float g = 0;\r
+ float b = 0;\r
+\r
+ graphic2D.setColorRGB(r, g, b);\r
+\r
+ // top\r
+ {\r
+ string message = "t = " + StringTools::toString(t);\r
+ graphic2D.drawTitleTop(message, ptrFont);\r
+ }\r
+\r
+ // bottom\r
+ {\r
+ graphic2D.drawTitleBottom("[API Image Cuda] : VagueImage warmup CUDA", ptrFont);\r
+ }\r
+ }\r
+\r
+/*--------------------------------------*\\r
+ |* Private *|\r
+ \*-------------------------------------*/\r
+\r
+/*----------------------------------------------------------------------*\\r
+ |* End *|\r
+ \*---------------------------------------------------------------------*/\r