1 #ifndef IMAGE_FONCTIONEL_MOOS_A_CPU_H
2 #define IMAGE_FONCTIONEL_MOOS_A_CPU_H
4 #include "ImageMOOs_A_CPU.h"
5 #include "DomaineMath_CPU.h"
10 /*----------------------------------------------------------------------*\
12 \*---------------------------------------------------------------------*/
14 /*--------------------------------------*\
16 \*-------------------------------------*/
19 * ImageMOO with a Mathematical Domaine. This domaine can be modified.
20 * An history of modification is maintained for undo.
24 class CBI_GLIMAGE ImageFonctionelMOOs_A
: public cpu::ImageMOOs_A
27 /*--------------------------------------*\
29 \*-------------------------------------*/
33 ImageFonctionelMOOs_A(unsigned int m
, unsigned int n
, cpu::DomaineMath domaine
);
35 ImageFonctionelMOOs_A(const cpu::ImageFonctionelMOOs_A
&imageSource
);
37 /*--------------------------------------*\
39 \*-------------------------------------*/
41 virtual ~ImageFonctionelMOOs_A();
43 /*--------------------------------------*\
45 \*-------------------------------------*/
49 virtual void fillImageGL(cpu::uchar4
* ptrTabPixel
, int w
, int h
, const cpu::DomaineMath
& domaineNew
)=0;
52 * Last Domaine push in History
54 void restoreFromDomaineHistory();
57 * First Domaine of History
59 void headOfDomaineHistory();
64 virtual void print(ostream
& stream
) const;
69 virtual void paintPrimitivesAPI(Graphic2Ds
& ptrGraphic2D
);
74 virtual void fillImageGL(cpu::uchar4
* ptrDevImageGL
, int w
, int h
);
80 * New mathematical domaine for this image.
81 * Previous domaine will be put in history and current domaine is domaineNew
83 virtual void onDomaineChangePerformed(const cpu::DomaineMath
& domaineNew
);
86 /*--------------------------------------*\
88 \*-------------------------------------*/
92 * Domaine currently used
94 cpu::DomaineMath
getCurrentDomaine() const;
96 /*--------------------------------------*\
98 \*-------------------------------------*/
102 void setCurrentDomaine(cpu::DomaineMath domaineNew
);
104 void setEnableDomaineOverlay(bool isEnable
);
106 /*--------------------------------------*\
108 \*-------------------------------------*/
112 inline bool isEnableDomaineOverlay()
114 return enableDomaineOverlay
;
117 /*---------------------------------------*\
119 \*---------------------------------------*/
123 cpu::DomaineMath homeDomaine
;
126 stack
<cpu::DomaineMath
> stackHistoryDomaine
;
127 bool enableDomaineOverlay
;