+#ifndef IMAGE_FONCTIONEL_MOOS_A_CPU_H\r
+#define IMAGE_FONCTIONEL_MOOS_A_CPU_H\r
+\r
+#include "ImageMOOs_A_CPU.h"\r
+#include "DomaineMath_CPU.h"\r
+\r
+#include <stack>\r
+using std::stack;\r
+\r
+/*----------------------------------------------------------------------*\\r
+ |* Declaration *|\r
+ \*---------------------------------------------------------------------*/\r
+\r
+/*--------------------------------------*\\r
+ |* Public *|\r
+ \*-------------------------------------*/\r
+\r
+/**\r
+ * ImageMOO with a Mathematical Domaine. This domaine can be modified.\r
+ * An history of modification is maintained for undo.\r
+ */\r
+namespace cpu\r
+ {\r
+ class CBI_GLIMAGE ImageFonctionelMOOs_A: public cpu::ImageMOOs_A\r
+ {\r
+\r
+ /*--------------------------------------*\\r
+ |* Constructor *|\r
+ \*-------------------------------------*/\r
+\r
+ public:\r
+\r
+ ImageFonctionelMOOs_A(unsigned int m, unsigned int n, cpu::DomaineMath domaine);\r
+\r
+ ImageFonctionelMOOs_A(const cpu::ImageFonctionelMOOs_A &imageSource);\r
+\r
+ /*--------------------------------------*\\r
+ |* Destructor *|\r
+ \*-------------------------------------*/\r
+\r
+ virtual ~ImageFonctionelMOOs_A();\r
+\r
+ /*--------------------------------------*\\r
+ |* Methodes *|\r
+ \*-------------------------------------*/\r
+\r
+ public:\r
+\r
+ virtual void fillImageGL(cpu::uchar4* ptrTabPixel, int w, int h, const cpu::DomaineMath& domaineNew)=0;\r
+\r
+ /**\r
+ * Last Domaine push in History\r
+ */\r
+ void restoreFromDomaineHistory();\r
+\r
+ /**\r
+ * First Domaine of History\r
+ */\r
+ void headOfDomaineHistory();\r
+\r
+ /**\r
+ * Override\r
+ */\r
+ virtual void print(ostream& stream) const;\r
+\r
+ /**\r
+ * Override\r
+ */\r
+ virtual void paintPrimitivesAPI(Graphic2Ds& ptrGraphic2D);\r
+\r
+ /**\r
+ * Override\r
+ */\r
+ virtual void fillImageGL(cpu::uchar4* ptrDevImageGL, int w, int h);\r
+\r
+ protected:\r
+\r
+ /**\r
+ * Override\r
+ * New mathematical domaine for this image.\r
+ * Previous domaine will be put in history and current domaine is domaineNew\r
+ */\r
+ virtual void onDomaineChangePerformed(const cpu::DomaineMath& domaineNew);\r
+\r
+\r
+ /*--------------------------------------*\\r
+ |* Get *|\r
+ \*-------------------------------------*/\r
+\r
+ public:\r
+ /**\r
+ * Domaine currently used\r
+ */\r
+ cpu::DomaineMath getCurrentDomaine() const;\r
+\r
+ /*--------------------------------------*\\r
+ |* Set *|\r
+ \*-------------------------------------*/\r
+\r
+ public:\r
+\r
+ void setCurrentDomaine(cpu::DomaineMath domaineNew);\r
+\r
+ void setEnableDomaineOverlay(bool isEnable);\r
+\r
+ /*--------------------------------------*\\r
+ |* Is *|\r
+ \*-------------------------------------*/\r
+\r
+ public:\r
+\r
+ inline bool isEnableDomaineOverlay()\r
+ {\r
+ return enableDomaineOverlay;\r
+ }\r
+\r
+ /*---------------------------------------*\\r
+ |* Attributs *|\r
+ \*---------------------------------------*/\r
+ private:\r
+\r
+ // Inputs\r
+ cpu::DomaineMath homeDomaine;\r
+\r
+ // Tools\r
+ stack<cpu::DomaineMath> stackHistoryDomaine;\r
+ bool enableDomaineOverlay;\r
+ };\r
+ }\r
+\r
+#endif\r